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-stringapiset-multibytetowidechar,
 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.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to