-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
中文乱码 gb2312格式 #138
Labels
Comments
同问,使用原生回调的metadata.stringValue 会出现乱码情况,这个有解决方案么? |
把乱码解码再编码
NSData *replacementCharacterData = [replacedStr dataUsingEncoding:NSISOLatin1StringEncoding];
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSString *dealwithStr = [[NSString alloc] initWithData:replacementCharacterData encoding:enc];
可以试下其他字符编码格式,或者全部字符不是同一种编码格式,需要拆开来,分别解码再编码
… 在 2019年10月29日,下午5:30,awesomedu ***@***.***> 写道:
同问,使用原生回调的metadata.stringValue 会出现乱码情况,这个有解决方案么?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#138?email_source=notifications&email_token=AMYBQOX6GDMONLU3BEZE6DLQQ77EXA5CNFSM4IH5DBS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECP2EAI#issuecomment-547332609>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AMYBQOQ36NSWHFIUIRQOEV3QQ77EXANCNFSM4IH5DBSQ>.
|
作者能把这个功能更新一下吗,github 上争做第一人👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: