Japlish

Richard Suchenwirth 2001-03-16 - Here's an uncompleted but working utility from The Lish family that converts a string of 7-bit ASCII to a string of Unicodes of Japanese hiragana, katakana, and (some few) Kanji. Still under construction, but feel free to grab and paste it. If you have improvements, just edit this page.

Normal-size hiragana (lowercase) and KATAKANA (UC) are all included (even the rare VU). Compound syllables like /kyou/ from Tokyo still await a better solution than spelling them out kiyou, and ignoring the smallness of the /yo/. The ambigous syllable /ji/ is not included, choose "di" or "zi". (One might allow ji for the more frequent "zi", maybe?)

I fixed some of the hiragana, I think. --Anon

Kanji are a problem for itself. Excluding for the moment non-unique spellings, just which to choose is a difficult question. I put in some at the beginning and supply the proc japlish:map, so the user can add what he wants. Not elegant, I admit. Anybody have a kanji word frequency list?

 set i18n_kanji {
        eki \u99c5
        mondai \u554f\u984c
        nihon \u65e5\u672c
        watashi \u79c1
 }
 set i18n_hiragana {
        kk xtuk gg xtug ss xtus zz xtuz tt xtut tch xtuch
        dd xtud jj xtuj hh xtuh ff xtuf mm nm rr xtur
        shi si sh sy ji zi j zy fu hu tsu tu
        ky kixy sy sixy ty tixy ny nixy hy hixy my mixy ry rixy
        gy gixy zy zixy dy dixy by bixy py pixy
        ka \u304b ga \u304c ki \u304d gi \u304e ku \u304f gu \u3050 
        ke \u3051 ge \u3052 ko \u3053 go \u3054
        sa \u3055 za \u3056 si \u3057 zi \u3058 su \u3059 zu \u305a 
        se \u305b ze \u305c so \u305d zo \u305e
        ta \u305f da \u3060 chi \u3061 di \u3062 tu \u3064 du \u3065
        te \u3066 de \u3067 to \u3068 do \u3069 xtu \u3063
        na \u306a ni \u306b nu \u306c ne \u306d no \u306e
         ha \u306f ba \u3070 pa \u3071 hi \u3072 bi \u3073 pi \u3074
        hu \u3075 bu \u3076 pu \u3077 he \u3078 be \u3079 pe \u307a
        ho \u307b bo \u307c po \u307d
        ma \u307e mi \u307f mu \u3080 me \u3081 mo \u3082
        xya \u3083 xyu \u3085 xyo \u3087
        ya \u3084 yu \u3086 yo \u3088
        ra \u3089 ri \u308a ru \u308b re \u308c ro \u308d
        wa \u308f wi \u3090 we \u3091 wo \u3092 n \u3093 vu \3094
        a \u3042 i \u3044 u \u3046 e \u3048 o \u304a
        xa \u3041 xi \u3043 xu \u3045 xe \u3047 xo \u3049
 }
 set i18n_katakana {
        KA \u30ab GA \u30ac KI \u30ad GI \u30ae KU \u30af GU \u30b0 
        KE \u30b1 GE \u30b2 KO \u30b3 GO \u30b4
        SA \u30b5 ZA \u30b6 SHI \u30b7 ZI \u30b8 SU \u30b9 ZU \u30ba 
        SE \u30bb ZE \u30bc SO \u30bd ZO \u30be
        TA \u30bf DA \u30c0 CHI \u30c1 DI \u30c2 TSU \u30c3 DU \u30c5
        TE \u30c6 DE \u30c7 TO \u30c8 DO \u30c9
        NA \u30ca NI \u30cb NU \u30cc NE \u30cd NO \u30ce
         HA \u30cf BA \u30d0 PA \u30d1 HI \u30d2 BI \u30d3 PI \u30d4
        HU \u30d5 BU \u30d6 PU \u30d7 HE \u30d8 BE \u30d9 PE \u30da
        HO \u30db BO \u30dc PO \u30dd
        MA \u30de MI \u30df MU \u30e0 ME \u30e1 MO \u30e2
        YA \u30e4 YU \u30e6 YO \u30e8
        RA \u30e9 RI \u30ea RU \u30eb RE \u30ec RO \u30ed
        WA \u30ef WI \u30f0 WE \u30f1 WO \u30f2 N \u30f3 VU \30f4
        A \u30a2 I \u30a4 U \u30a6 E \u30a8 O \u30aa
        XA \u30a1 XI \u30a3 XU \u30a5 XE \u30a7 XO \u30a9
 }
 proc japlish args {
        foreach {from to} [concat $::i18n_kanji $::i18n_hiragana $::i18n_katakana] {
                regsub -all $from $args $to args
        }
        set args
 }
 proc japlish:map {string kanji} {lappend ::i18n_kanji $string $kanji}

See also Common Questions about Tcl/Tk and Japanese language support - Things Japanese - i18n - Writing for the world