Purpose: collect Tcl code specific to the Japanese culture. Part of a series that started with [Things British] ---- '''Nengo calculation''': The Japanese calendar starts counting years from 1 with each accession of an emperor, who baptizes his era with a two-Kanji name, ''nengo'' (see for exampe http://japanesesword.homestead.com/files/kanji/nengo.htm). The following nengo are important for recent times: Meiji 1868-1911 Taisho 1912-1925 Showa 1926-1988 Heisei 1989- For these four eras (and four more free positions), Unicodes have been allocated that render both Kanji into one character. (One might of course also render the two separately, from the regular CJK set). The windows font "Arial Unicode MS" has these four characters, so the following code was possible: proc nengo {{year ""}} { if {$year==""} {set year [clock format [clock seconds] -format %Y]} if {$year<1912} { incr year -1867; set nengo \u337E ;# Meiji } elseif {$year < 1926} { incr year -1911; set nengo \u337D ;# Taisho } elseif {$year < 1989} { incr year -1925; set nengo \u337C ;# Showa } else { incr year -1988; set nengo \u337B ;# Heisei } return $nengo$year } ;# RS ---- [Japlish] offers a functional converter from Romaji (7-bit ASCII letters for ''hiragana'' and ''KATAKANA'', the two syllabic writing systems used in Japan) to the corresponding Unicodes, plus a handful of Kanji words - add more if you need them... ---- [i18n - writing for the world] - [Arts and crafts of Tcl-Tk programming]