Use UTF8 string encoding in ORTSaveCodeAndDescriptionToError(). (#22982)

Update from ASCII to UTF8 string encoding when creating the `NSString` description.
This commit is contained in:
Edward Chen 2024-12-02 17:41:52 -08:00 committed by GitHub
parent 8c52fa3924
commit e2356a0403
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ void ORTSaveCodeAndDescriptionToError(int code, const char* descriptionCstr, NSE
if (!error) return;
NSString* description = [NSString stringWithCString:descriptionCstr
encoding:NSASCIIStringEncoding];
encoding:NSUTF8StringEncoding];
*error = [NSError errorWithDomain:kOrtErrorDomain
code:code