Closed xpol closed 8 years ago
I've spent a little time researching this issue. It seems you should be able to set the encoding of this specific file by opening it in VS, selecting File->Advanced save options and selecting Unicode 65001 code page. I'm not sure why I don't see this warning. Maybe you have a different locale setup on your version of Windows? If this resolves the problem for you, I'll consider adding the UTF8 BOM to the beginning of the file.
But does compilers like gcc clang support UTF-8 BOM?
Thomas Fussell notifications@github.com于2016年5月15日周日 上午4:00写道:
I've spent a little time researching this issue. It seems you should be able to set the encoding of this specific file by opening it in VS, selecting File->Advanced save options and selecting Unicode 65001 code page. I'm not sure why I don't see this warning. Maybe you have a different locale setup on your version of Windows? If this resolves the problem for you, I'll consider adding the UTF8 BOM to the beginning of the file.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tfussell/xlnt/issues/43#issuecomment-219248507
It looks like GCC and clang both correctly interpret UTF-8 BOM in source files.
Commit 760d044f7d8202db0898403f128c0c568257dd38 should take care of this by adding a UTF-8 BOM to number_format.cpp. I'm going to close this issue for now assuming this is fixed. We may revisit this decision in the future. Leave a comment if this doesn't solve your problem xpol.
I have tested on Windows 10 with Chinese locale. It builds successfully. Thank you very much!
Tthe EURO SIGN at https://github.com/tfussell/xlnt/blob/master/source/styles/number_format.cpp#L767 not handled by Visual Studio 2015:
I know that is MS' fault.
Can we use escape sequance
\xE2\x82\xAC
, something like: