8 Jun
2022
8 Jun
'22
6:07 p.m.
Why is the IBM437 encoding not supported in boost::locale with the Win32 API ("wconv") backend? The following call will fail with a boost::locale::conv::invalid_charset_error when using the Win32 API backend: boost::locale::conv::to_utf<char>("abc", "IBM437") This is because "ibm437" is not contained in the all_windows_encodings variable in wconv_codepage.ipp (nor is "cp437" or another alias). As per Win32 API documentation (https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapi..., https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers), this encoding is supported in Win32 API. Furthermore, IBM437 is the legacy encoding of filenames in ZIP files, so it should be quite common.