Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added missing decoding of UTF8 string type

use UTF8 encoding for everything since ASCII is a subtype of that anyway
  • Loading branch information...
commit 6f9d171539ffcd9cbdf93452c7c4c9d4bacb4b2d 1 parent 2ea3414
Oliver Drobnik authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 Core/Source/DTASN1Parser.m
5 Core/Source/DTASN1Parser.m
@@ -312,19 +312,20 @@ - (BOOL)_parseValueWithTag:(NSUInteger)tag dataRange:(NSRange)dataRange
312 312 case DTASN1TypeTeletexString:
313 313 case DTASN1TypeGraphicString:
314 314 case DTASN1TypePrintableString:
  315 + case DTASN1TypeUTF8String:
315 316 {
316 317 if (_delegateFlags.delegateSupportsString)
317 318 {
318 319 char *buffer = malloc(dataRange.length);
319 320 [_data getBytes:buffer range:dataRange];
320 321
321   - NSString *string = [[NSString alloc] initWithBytesNoCopy:buffer length:dataRange.length encoding:NSASCIIStringEncoding freeWhenDone:YES];
  322 + NSString *string = [[NSString alloc] initWithBytesNoCopy:buffer length:dataRange.length encoding:NSUTF8StringEncoding freeWhenDone:YES];
322 323
323 324 [_delegate parser:self foundString:string];
324 325 }
325 326 break;
326 327 }
327   -
  328 +
328 329 case DTASN1TypeUTCTime:
329 330 case DTASN1TypeGeneralizedTime:
330 331 {

0 comments on commit 6f9d171

Please sign in to comment.
Something went wrong with that request. Please try again.