[Locale] IBM437 encoding not supported in wconv

"Arnold, Stefan via Boost-users" <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <AM8PR01MB81203E4DB7B9889017A1C17F93A49@AM8PR01MB8120.eurprd01.prod.exchangelabs.com>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.