in reply to Encode: unable to change encoding of strings
*hint* from_to does decode and encode inplace.
perhaps you should use decode first to convert:
perl -MEncode -e '$_="\xc3\x81mbito"; print $_; $_ = decode "utf-8", $ +_; print encode "iso-8859-1", $_' perl -MEncode -e '$_="\xc1mbito"; print $_; $_ = decode "iso-8859-1", +$_; print encode "utf-8", $_'
work like a charm ;-)
saludos,
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Encode: unable to change encoding of strings
by Hue-Bond (Priest) on Jul 09, 2006 at 08:44 UTC |