Linux   « TEST for SMTP Auth | HOME | HDD Format »

 ■ Nkf - Change Japanese encording

Garble (Mojibake)
If your mail is garbled, you need to install nkf to change the encording.

Install
# wget http://keihanna.dl.sourceforge.jp/nkf/20770/nkf207.tar.gz
# tar zxvf nkf207.tar.gz
# cd nkf207
# make
# cp nkf /usr/bin

then delete installation files.

In my system, the default encording is UTF-8. So you can change it to EUC, S-JIS or JIS with nkf.

# nkf [option] input_file > output_file
sample : # nkf -s index.html > newindex.html

-e : to EUC
-s : to S-JIS
-j : to JIS
-w : to UTF-8
-u : no buffering

Also you can use like this.
# cat file_name | nkf -s


Moreover you can change the line feed code between Linux, Mac OS and Windows.
-Lu : change to Linux line feed code
-Lm : change to Mac OX line feed code
-Lw : change to Windows line feed code

===========================
reference
http://cns-guide.sfc.keio.ac.jp/2004/2/4/12.html

投稿者 tomopugh : 2007年07月26日 14:31

Comment

Konnichiwa!
Gokigen ikagadesuka?
Ki o tsuketene.
P'Tomo ^^

投稿者 Anonymous : 2007年07月26日 22:23

Please comment !




Save the info?


  (Please don't click on "post" twice. It takes time a bit to change to the next screen!!)