Closed feiyunw closed 1 year ago
I think this causes characters to not show at all, but I'll need to confirm
I verified that the built x64 version is compatible with Simplified Chinese. julius-log.txt
Some warnings after switching code page to utf-8:
2>D:\prj\julius\ext\png\png.h(1,1): warning C4828: The file contains a character starting at offset 0x355 that is illegal in the current source character set (codepage 65001).
2>D:\prj\julius\ext\zlib/zlib.h(1,1): warning C4828: The file contains a character starting at offset 0x567 that is illegal in the current source character set (codepage 65001).
png.h, line 22:
* Changed for Julius by Jos?Cadete (crudelios) on 11 Feb 2020.
zlib.h, line 30:
Changed for Julius by Jos?Cadete (crudelios) on 11 Feb 2020.
As "é" in José is incompatible with utf-8, I guess. Fortunately, it does not cause compile error.
Afaik the files are not saved in utf8 format, rather on iso-8859-1 (except for the Chinese etc translation files), hence the warning.
All files in the Julius src directory should be UTF-8. Most of them are plain ASCII, which is basically the same as/compatible with ISO-8859-1. If the PNG files are another encoding, we should re-save them as UTF-8.
Some compile error on non-English MSVC:
"/utf-8" in *.vcxproj files can fix it like:
Anyway, CMake add_compile_options() didn't work as expected, thus a CMAKE_C_FLAGS workaround is used in this PR.
FYI: /utf-8 add_compile_options