On Sun, Sep 4, 2011 at 3:05 PM, tomushkin@gmail.com
<perlbug-followup@perl.org> wrote:
> # perl -MEncode -e 'decode("IBM037", "\x{a2}\x{97}\x{81}\x{94}")'
> Unknown encoding 'IBM037' at -e line 1
>
> My servers are spammed with IBM037 encoded email, that renders
> properly by the most mail clients, but fails to decode by the
> perl filters. For some reason, it doesn't alias to cp37, but
> cp037. I use the following workaround:
>
> use Encode::Alias;
> define_alias(qr/^cp0+(\d+)$/i => ''"cp$1"'');
Actually, there are a lot more encodings that have a codepage
number[1]. It could be useful to add aliases for all encodings that we
do support (after all, who knew cp65001 is actually just utf-8).
Leon
Thread Previous
|
Thread Next