diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m index af1ce0bf239..730a1436e48 100644 --- a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m @@ -54,7 +54,7 @@ + (instancetype)grpc_stringFromMetadataValue:(grpc_metadata *)metadata { return [[self alloc] initWithBytes:GRPC_SLICE_START_PTR(metadata->value) length:GRPC_SLICE_LENGTH(metadata->value) - encoding:NSASCIIStringEncoding]; + encoding:NSUTF8StringEncoding]; } // Precondition: This object contains only ASCII characters. diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.m b/src/objective-c/GRPCClient/private/NSError+GRPC.m index 74cfa943ccb..c2e65e4d8a2 100644 --- a/src/objective-c/GRPCClient/private/NSError+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSError+GRPC.m @@ -27,7 +27,7 @@ NSString *const kGRPCErrorDomain = @"io.grpc"; if (statusCode == GRPC_STATUS_OK) { return nil; } - NSString *message = [NSString stringWithCString:details encoding:NSASCIIStringEncoding]; + NSString *message = [NSString stringWithCString:details encoding:NSUTF8StringEncoding]; return [NSError errorWithDomain:kGRPCErrorDomain code:statusCode userInfo:@{NSLocalizedDescriptionKey : message}];