in reply to UTF8 issues
I tested the Perl script on hiragana text in Unicode Normalization Form D as well as in Normalization Form C. It doesn't handle NFD properly.
For this input…
NFC どらいどまんごす
NFD どらいどまんごす
…it generates this output…
NFC doraidomangosu
NFD to゙raito゙manko゙su
…which isn't right. The module Lingua::JA::Moji isn't accounting for the possibility of Japanese kana in their decomposed form (NFD).
This may not matter to you for your application, but I felt it was worth pointing out to you in any case. If it does matter to you, then you might suggest to the author of Lingua::JA::Moji that he use the core module Unicode::Normalize to normalize the characters to NFC prior to converting them from kana to romaji.
U+3069 HIRAGANA LETTER DO U+3089 HIRAGANA LETTER RA U+3044 HIRAGANA LETTER I U+3069 HIRAGANA LETTER DO U+307E HIRAGANA LETTER MA U+3093 HIRAGANA LETTER N U+3054 HIRAGANA LETTER GO U+3059 HIRAGANA LETTER SU
U+3068 HIRAGANA LETTER TO U+3099 COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK U+3089 HIRAGANA LETTER RA U+3044 HIRAGANA LETTER I U+3068 HIRAGANA LETTER TO U+3099 COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK U+307E HIRAGANA LETTER MA U+3093 HIRAGANA LETTER N U+3053 HIRAGANA LETTER KO U+3099 COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK U+3059 HIRAGANA LETTER SU
|
|---|