Saqib Ali Asked: 2013-08-16 10:59:17 +0800 CST2013-08-16 10:59:17 +0800 CST 2013-08-16 10:59:17 +0800 CST How can I create a cp932 encoded text file on Ubuntu? 772 Is there a way to create a cp932 encoded file on Ubuntu? files 1 Answers Voted Rinzwind 2013-08-16T11:08:40+08:002013-08-16T11:08:40+08:00 gedit, "Save as" has an option to save it with a different encoding. After that it should accept Japanese chars. as seen here: ~/Desktop$ file test.txt test.txt: DBase 3 data file with memo(s) Command line convert a file to cp933: recode cp932 {filename} or iconv -f utf8 -t cp932 {filename} > {newfilename} You probably need to install recode with sudo apt-get install recode If you do touch {filename} recode cp932 {filename} you create an empty file and should be able to add cp932 chars to the file. If you use vim place the following in your /etc/vim/vimrc or ~/.vimrc file: set encoding=cp932 set fileencoding=cp932 and the system will save the with cp932.
gedit
, "Save as" has an option to save it with a different encoding.After that it should accept Japanese chars.
as seen here:
Command line
convert a file to cp933:
or
You probably need to install
recode
withsudo apt-get install recode
If you doyou create an empty file and should be able to add cp932 chars to the file.
If you use
vim
place the following in your/etc/vim/vimrc
or~/.vimrc file
:and the system will save the with cp932.