kepler has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm having a hard time with this subject: I'm trying to tranform a string that might contain accented or other special character(like á, ì, ç, etc.) but without any luck. I've tryed using Unicode::Normalize
use Unicode::Normalize; use Encode; $str = "áçò"; $string = decode("ISO-8859-1", $str); #windows-1250 $string = NFD($string); $string =~ s/\pM//og;
It works in my laptop, but not in my webserver. I've installed the module (I got no error). In the substitution of "porto de mós", for instance, I get "porto de mas". The accented characters are always substituted by an "a"... Any ideas? I've also tryed Text::Unidecode. But I get even weirder characters...
Kind regards, Kepler
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Accented characters and others...
by Corion (Patriarch) on Oct 25, 2015 at 07:32 UTC | |
Re: Accented characters and others...
by stevieb (Canon) on Oct 25, 2015 at 04:14 UTC | |
Re: Accented characters and others...
by Anonymous Monk on Oct 25, 2015 at 15:39 UTC | |
by Your Mother (Archbishop) on Oct 25, 2015 at 20:58 UTC |