[EMAIL PROTECTED] wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, Dec 27, 2006 at 04:56:50PM +0100, Cyril SCETBON wrote:
I'm using Modperl 2.0.2 with apache 2.0.55 and modperl is doing
something wrong with my string :
my $var="à présent protégé";
warn Dumper [$var];
my $var="à présent protégé".$login;
warn Dumper [$var];
$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"
];
__END__;
The accents are no more printed correctly !!
Hm. So it seems that Perl changes its notion of string encoding when
modifying it. Curious.
Your source seems to be UTF-8. Have you tried to invoke the pragma "use
utf-8"?
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"
];
[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 ???
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFFk1WbBcgs9XrR2kYRAuWUAJ4jOouhO0F5SjMIlRQFRZl5aGIGUwCfSi4Y
9wzCCGflvOVt4nd8M7bVNjI=
=AAPm
-----END PGP SIGNATURE-----