[tex-k] Encoding of output

TANAKA Takuji ttk at t-lab.opal.ne.jp
Sun Sep 30 02:38:14 CEST 2018


Hi,

In Windows,
conventional C code (ex. int main(argc, argv){}, fopen(), puts()) assumes
the character encoding is a legacy encoding,
CP1252 in Europe & north America, CP932 in Japan.
The function command_line_encoding provides wrapper functions
to treat command line arguments, file I/O and console I/O.

If a developer wishes to fix character encoding UTF-8, the following usage will work.

* set kpse->File_system_codepage = CP_UTF8 and kpse->Is_cp932_system = 0
   (ref. kpathsea/knj,c)
* replace from POSIX functions to wrapper functions
   (ex. fputs -> win32_fputs)

https://github.com/matplotlib/matplotlib/pull/11848#issuecomment-425684161

Best,
Takuji


More information about the tex-k mailing list