(AIX/ksh) i have a chinese file ...i cant able to open it in aix using cat fully...if i give cat then some contents are missing...and if i give cat -v it is giving wierd code....even i tried with while loop to read contents,but not working...with more command i can but i cant use more in shell scripting...so please shed some idea here...many thanks
+1
A:
The issue seems to be your terminal emulator, not the cat command itself which just output the file's content without processing. Make sure your character encoding is correct, should be LC_CTYPE, LC_ALL or perhaps LANG and that your terminal can display chinese characters.
jlliagre
2010-07-02 09:56:08
He may also want to have a look at iconv.
ninjalj
2010-07-02 10:07:12
everything is ok with terminal emulator and lang settings...what i need is alternative to cat or more command which could read the chinese file correctly
aln
2010-07-02 10:19:14
cat is reading the file correctly; it can't do otherwise. http://www.joelonsoftware.com/articles/Unicode.html
msw
2010-07-02 13:39:36
Maybe is your text file corrupted. Are you sure it is correct in the first place ?
jlliagre
2010-07-02 17:47:43