[Linux-disciples] Converting to ISO-8859-1
Stephen R Laniel
steve at laniels.org
Mon Jun 19 15:50:07 EDT 2006
On Mon, Jun 19, 2006 at 03:40:34PM -0400, Stephen R Laniel wrote:
> Those \x{...} blocks are just Unicode code points, for
> little things like open double quotes and apostrophes. I'm
> puzzled why Perl wouldn't know how to get that code point
> out in ISO-8859-1. Any idea?
I think the answer is Unicode::String:
http://search.cpan.org/~gaas/Unicode-String-2.09/String.pm
It seems to have done the trick -- and without many lines of
code! Just read in a string, and then write it back out
using the Unicode::String::latin1() function. Nice. I don't
think I even had to tell it the encoding for the incoming
string -- only for the outgoing one. I'm a bit puzzled how
that's possible, but it seems to be.
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060619/80e3a88f/attachment.pgp
More information about the Linux-disciples
mailing list