views:

19

answers:

1

(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
He may also want to have a look at iconv.
ninjalj
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
cat is reading the file correctly; it can't do otherwise. http://www.joelonsoftware.com/articles/Unicode.html
msw
Maybe is your text file corrupted. Are you sure it is correct in the first place ?
jlliagre