Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Translating old to new kanji forms using tr



I need to go back and forth between the old (旧字) and the modern kanji 
forms. I have a list of corresponding old and new form and the the 
stardard utility "tr" works fine for a test case:

echo 仏 | tr 仏 佛

Gives back 佛 just fine.

But as soon as I get more than a handful of characters in the two 
translation pair lists I get random answers that make no sense. I am 
setting up a script that simply feeds "tr" the two long lists that I 
have stuffed into two variables. But I have tried testing "tr" outside 
of the script and get the same weird results. I am running very standard 
Debian Sarge 3.1, starting up X with

export XMODIFIERS="@example.com=kinput2" LC_CTYPE=ja_JP.UTF-8

Which seems to make all the usual utilities work just fine with kanji 
inside the "konsole" (or plain old xterm as far as that goes).


Anybody tried to do this kind of stuff with "tr"? Or have another solution?

Thanks,

David Riggs Kyoto


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links