Necesito normalizar una cadena como "quée" y no puedo convertir los caracteres ASCII extendidos como é, á, í, etc. en versiones roman/inglés. He intentado varios métodos diferentes pero nada funciona hasta ahora. Hay una buena cantidad de material sobre este tema general, pero parece que no puedo encontrar una respuesta funcional a este problema.Normalización de caracteres ASCII
Aquí está mi código:
#transliteration solution (works great with standard chars but doesn't find the
#special ones) - I've tried looking for both \x{130} and é with the same result.
$mystring =~ tr/\\x{130}/e/;
#converting into array, then iterating through and replacing the specific char
#(same result as the above solution)
my @breakdown = split("",$mystring);
foreach (@breakdown) {
if ($_ eq "\x{130}") {
$_ = "e";
print "\nArray Output: @breakdown\n";
}
$lowercase = join("",@breakdown);
}
¡Solución maravillosa, funciona genial! ¡Gracias! –