-
Notifications
You must be signed in to change notification settings - Fork 400
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
Languages support #281
Comments
thanks for reporting his problem. UTF compatibility is a priority for me. Could you show me the code that caused this problem? Or tell me more about what you were trying to do. |
@tfussell Chinese also got the same fault. ws.cell("B2").value("Hello world"); in sample code with ws.cell("B2").value("你好,世界"); and you will get the fault. |
Finally I solved the problem by noticing issue #215 and using u8"你好,世界". I think @earth2378 might encounter the same problem as mine. |
Nice find. A catch you may want to be aware of if you need portability is that even with the u8 literal, different compilers/editors may still choke and give the incorrect output (relevant stack overflow). The only way to ensure that everything works as expected anywhere with literals is the unicode escape sequences. It's downright ugly though :(
Hex format from https://unicodelookup.com/#%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C/1 |
It is likely that using u8 prefix (+ escape sequences if neccesary) will resolve the reported issue for @earth2378 . Confirmation (or not) of this would be appreciated @tfussell |
I try to use your method,but if I want to read a excel,like |
What are you trying to do with it? It should be a valid UTF-8 string you can use like any other Chinese UTF-8 string from another source. |
I tried to use with Thai language but it was found that:
terminate called after throwing an instance of 'xml::serialization'
what(): xl/sharedStrings.xml: error: invalid UTF-8
The text was updated successfully, but these errors were encountered: