Re: Bug in Encode::encode('MIME-Q', $iso_8859_1_string)

[email protected] (Sven Neuhaus)
Newsgroups perl.unicode
Organization Heise Zeitschriften Verlag GmbH & Co. KG
Message-ID <[email protected]>
John Delacour wrote:
> At 3:54 pm +0100 23/11/05, Sven Neuhaus wrote:
> 
>> this seems to be a bug:
>>
>> b)
>> perl -MHTML::Entities -MEncode -e '$a="abc&Auml;";
>> print encode("MIME-Q", HTML::Entities::decode($a)), "\n";'
>>
>> Result:
>> =?UTF-8?Q?abc=C4def?=
> 
> 
> 
> What about this:
> 
>      perl -MHTML::Entities -MEncode -e 'use encoding ("iso-8859-1");
>      $a = "abc&Auml"; print encode "MIME-Q", decode_entities $a . $/'
> 
>      =?UTF-8?Q?abc=C3=84?=

I don't want to use encoding iso-8859-1... Can't the encode function just
recognize the string charset (UTF-8 or not)? That would be The Right Thing.

-Sven
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.