The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 09-01-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
There is no such thing as an "AIX character set". There are bytes in the file, and there is your terminal, and there are multiple conventions for how to display the bytes in the file on any particular terminal. If you know the character set encoding of the file, and the character repertoire of your terminal, you can predict how any particular byte sequence will be displayed, but if one or the other is unknown, it's pretty hard to say what you should expect (or even indeed what you are talking about).

Plain 7-bit data is usually displayed as ASCII, which is completely well-defined, but the (tm) character is not part of the 7-bit ASCII character set; you are apparently viewing the file under two different interpretations of the character-set encoding in the file, perhaps using two different terminals, or different tools which impose different assumptions. (On AIX perhaps you have the option to add EBCDIC into the mix, but let's not go there.)

Anyway, to troubleshoot this, you might want to use a hex dump tool (od, xxd, hexdump, or even just cat -A) to inspect what the actual bytes in the file are. Once you know that, it should not be hard to figure out which encoding gives the interpretation you want, and/or convert the file to the representation you want.