-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Dec 28, 2006 at 07:18:29PM +0100, Cyril SCETBON wrote: > > > [EMAIL PROTECTED] wrote: > >-----BEGIN PGP SIGNED MESSAGE----- > >Hash: SHA1 > > > >On Wed, Dec 27, 2006 at 04:56:50PM +0100, Cyril SCETBON wrote:
[...] > Here you can see the results when I use pragma utf8 : > > [use utf8] > > $VAR1 = [ > "\x{e0} pr\x{e9}sent prot\x{e9}g\x{e9}" > ]; > $VAR1 = [ > "\x{e0} pr\x{e9}sent prot\x{e9}g\x{e9}login774" > ]; Dang! :-) > [no utf8] > > $VAR1 = [ > 'à présent protégé' > ]; > $VAR1 = [ > "\x{c3}\x{a0} pr\x{c3}\x{a9}sent > prot\x{c3}\x{a9}g\x{c3}\x{a9}login774" > ]; > > It's really weird, isn't it ??? No, it isn't. So your source is actually in iso-8859-1. Just the second half looks weird to me (what is changing the perceived encoding of the string after appending something seemingly harmless? Anyway -- I'd suggest to stick to utf-8 (and use a text editor that supports it). In the long run you'll have less headaches. In the meantime, if your editor doesn't help you, you might try use Encode 'decode'; ... $str = decode("iso-8859-1", 'à présent protégé'); (see man perluniintro, man perlunicode for the gory details). HTH - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFlPyEBcgs9XrR2kYRAq/IAJ0WZ+oh8i8PHqzpKmcO1Ez+Tia91wCeJHhA +brWNcpPEkPrSQBbm7t2Vrk= =oq8I -----END PGP SIGNATURE-----