herzbube / libsgfcplusplus

libsgfc++. A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Apache License 2.0
12 stars 2 forks source link

Find a way to run encoding unit tests related to EU-CN on Windows #37

Open herzbube opened 3 years ago

herzbube commented 3 years ago

Some unit tests use the EU-CN encoding to test multi-byte encoding vs. escaping behaviour of SGFC. On Windows these tests had to be disabled because they always fail on a standard (western) Windows installation, such as the one used by the Github Actions windows-latest runner.

The reason: Although win-iconv knows EU-CN and maps it to the correct codepage 51936, the underlying Win32 API functions IsValidCodePage() and GetCPInfo() don't know the codepage and make it impossible for win-iconv to perform the decoding of EU-CN.

Question 1 is how the codepage for EU-CN can be made available on Windows in general. Question 2 is how this can be achieved in an automated way on the Github Actions windows-latest runner.