Subject: | netbsd: encoding::_get_locale_encoding returns invalid encoding name (Encode < 2.73) |
On netbsd with Encode 2.60:
perl -w '-MEncode 2.05' -mencoding -e 'print encoding::_get_locale_encoding, $/'
646
The "646" value comes directly from I18N::Langinfo
perl -MI18N::Langinfo=langinfo,CODESET -e 'print langinfo(CODESET), $/'
646
I think this is an issue that has been fixed in 2.73 (with my rewrite of encoding::_get_locale_encoding), however this is not enforced by tests.
https://github.com/dankogai/p5-encode/commit/4ed9ed08d2943ffc222863bc353a4a6e484c97db
Unfortunately I don't have direct access to a netbsd system to fully understand the issue (I found the issue through CPAN Testers).
So the next step would be to add a test that checks encoding::_get_locale_encoding returns either undef or the name of an encoding known to Encode.
That test would also dump the result of langinfo, the current locale (POSIX::setlocale) and locale related environment variables for diagnostics.
(this is something that I intend to do myself, but that may take months because of my lack of tuits)
--
Olivier Mengué - http://perlresume.org/DOLMEN
perl -w '-MEncode 2.05' -mencoding -e 'print encoding::_get_locale_encoding, $/'
646
The "646" value comes directly from I18N::Langinfo
perl -MI18N::Langinfo=langinfo,CODESET -e 'print langinfo(CODESET), $/'
646
I think this is an issue that has been fixed in 2.73 (with my rewrite of encoding::_get_locale_encoding), however this is not enforced by tests.
https://github.com/dankogai/p5-encode/commit/4ed9ed08d2943ffc222863bc353a4a6e484c97db
Unfortunately I don't have direct access to a netbsd system to fully understand the issue (I found the issue through CPAN Testers).
So the next step would be to add a test that checks encoding::_get_locale_encoding returns either undef or the name of an encoding known to Encode.
That test would also dump the result of langinfo, the current locale (POSIX::setlocale) and locale related environment variables for diagnostics.
(this is something that I intend to do myself, but that may take months because of my lack of tuits)
--
Olivier Mengué - http://perlresume.org/DOLMEN