(SOLVED) Terminal problems with Japanese characters
I am having some trouble getting Japanese text to show up properly inside my terminal/console. I do not want to use Kterm because it does not have some necessary features. Basically, I just want to know how to get something like mrxvt or konsole or xterm to work with this particular text properly.
I am running Ubuntu 6.10, and I have the Japanese language packs installed. Here is the basic problem:
I have a dictionary file that I am going to parse text from, but normal consoles (xterm, KDE's konsole) do not see the Japanese properly text when I do 'head dictionary_file' (I'm using Jim Breen's edict file) or anything else to output to the console. My consoles do work if I write in Japanese into them (both hiragana, katakana and kanji). I just cannot seem to get the text from this file.
Here is a small sample of the file:
Kterm interprets the information properly, and here is the output from within Kterm with 'head dictionary_file':
If there is a problem with the dictionary_file itself, like perhaps it has been encoded strangely and needs to be altered, that is an option I would be happy to explore, but I really do not know if that is the root of the issue.
I tried custom compiling mrxvt from source with every variation of the options I could find the ./configure --help list, but nothing seems to work and they all give me garbage output. Again, I basically just want to know how to get something like mrxvt or konsole or xterm to work with the text properly.
EDIT: I figured out that the dictionary file was encoded using EUC, which is obviously wrong. So I used a program called 'nkf' to convert the text to UTF-8.
Or you could do it the other way around; open the file and in the editor, if it lets you (like Bluefish for example), set the encoding of the file to be 'nkf' (or one that works with it), and after that the editor should know how to deal with the letters. Your way is of course working, as long as you remember that where ever the file is being used, the encoding in the file must work with the software that is using it. It the software expects the file to be encoded in 'nkf' and not UTF-8, you might get into trouble.
A note: if and when you solve the problem, it's a good habit to write instructions (short or longer) that tell how you got around the problem, fixed it or got the situation better. Or at least where you got the information to do it; this helps other people with similar problems to get their own cases solved. And after this change the topic of the thread so that it reads something like [SOLVED] in it, so people know the thing is solved.
|All times are GMT -5. The time now is 05:44 AM.|