Skip to content

Instantly share code, notes, and snippets.

@zonble
Created November 2, 2010 14:08
Show Gist options
  • Save zonble/659647 to your computer and use it in GitHub Desktop.
Save zonble/659647 to your computer and use it in GitHub Desktop.
Big5 字串轉成 UTF8 字串
NSStringEncoding big5 = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingBig5_HKSCS_1999);
NSString *string = [[NSString alloc] initWithData:data encoding:big5];
NSData *UTF8Data = [string dataUsingEncoding:NSUTF8StringEncoding];
[string release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment