Created
November 2, 2010 14:08
-
-
Save zonble/659647 to your computer and use it in GitHub Desktop.
Big5 字串轉成 UTF8 字串
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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