给文件路径加上编码
swift:
let enc = CFStringConvertEncodingToNSStringEncoding(CFStringEncoding(CFStringEncodings.GB_18030_2000.rawValue))
let path = entry.path(using: String.Encoding(rawValue: enc)!)
OC:
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSString *strPath = [NSString stringWithCString:filename encoding:enc];
网友评论