iOS-ios-8859-1转码utf-8

2018-12-06  本文已影响0人  浅淡_dyw

+ (NSString*)_859ToUTF8:(NSString*)oldStr

{

    NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin1);

    return [NSString stringWithUTF8String:[oldStr cStringUsingEncoding:enc]];

}

上一篇下一篇

猜你喜欢

热点阅读