From ed0c562d672ea1895f2f9c673e8255f3ef923302 Mon Sep 17 00:00:00 2001 From: Lukas Lipka Date: Fri, 24 Nov 2017 10:57:32 +0100 Subject: [PATCH] Change encoding to UTF8. --- src/objective-c/GRPCClient/private/NSDictionary+GRPC.m | 2 +- src/objective-c/GRPCClient/private/NSError+GRPC.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m index 4af7cb9a019..9f33229bfd2 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 6ba7235df44..22ff62a9b00 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}];