LBXScan
LBXScan copied to clipboard
中文乱码 gb2312的编码格式
- 在网上百度了很多种方法都不能解决https://blog.csdn.net/lsy2013/article/details/46827435这种方法也没有解决
hello brother, 遇到了跟你同样的问题,上面写的解决乱码的方法都不适用。现在已经找到解决方案了吗?
把乱码解码再编码 NSData *replacementCharacterData = [replacedStr dataUsingEncoding:NSISOLatin1StringEncoding]; NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSString *dealwithStr = [[NSString alloc] initWithData:replacementCharacterData encoding:enc]; 可以试下其他字符编码格式,或者全部字符不是同一种编码格式,需要拆开来,分别解码再编码
在 2019年10月29日,下午2:34,awesomedu [email protected] 写道:
hello brother, 遇到了跟你同样的问题,上面写的解决乱码的方法都不适用。现在已经找到解决方案了吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MxABC/LBXScan/issues/191?email_source=notifications&email_token=AMYBQORGLT34KEVNXPCBPGTQQ7KPVA5CNFSM4IH5CCAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECPMXGA#issuecomment-547277720, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYBQORZIDPHYYGBROZLKVTQQ7KPVANCNFSM4IH5CCAA.