"quée"のような文字列を正規化する必要があり、é、á、íなどの拡張ASCII文字をローマ字/英語バージョンに変換できないようです。私はいくつかの異なる方法を試しましたが、これまで何も動作していません。この一般的な主題にはかなりの量の資料がありますが、私はこの問題の解決策を見つけることができません。ASCII文字の正規化
は、ここに私のコードです:
#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);
}
素敵な解決策、それは素晴らしい動作します!ありがとうございました! –