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Ä"; >> 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Ä"; 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