Re: Standard alternative to Encode::Locale ?
-----BEGIN PGP SIGNED MESSAGE-----
On Tue, Apr 29, 2014 at 03:19:03PM +0900, Charles Plessy wrote:
> Greetings everybody,
> In the package mime-support, priority “standard”, there is the program
> “run-mailcap”, which is a Perl script. This program open files following their
> media type and the mailcap system (in particular “/etc/mailcap”).
> [...] decoded with the Encode::decode function, which needs
> to know the current locale. The Encode::Locale module works perfectly
> for this, but is of priority “optional”…
> Do you have suggestions to solve this problem without making mime-support's
> depend on non-“standard” packages ?
speaking from the peanut gallery:
On Unixoids you might ask "locale" directly and try to parse its output (e.g.
"locale -c charmap" or similar; we might want to figure out portability).
But this is basically what Encode::Locale is doing anyway (through a library
call, via I18N::Langinfo, that is). Since it's just a tiny wrapper around
Langinfo, and since this one is part of the core perl distro, and since
Encode::Locale takes care of all the little ugly edge cases one would have
to learn the hard way (just look into the code to see what I mean ;-) --
wouldn't it make sense to make it a dependency? Or to bless Encode::Locale
into the "standard" category?
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----