How To
Summary
How to examine data to determine character encoding, and resolve data rendering conflicts.
Objective
Steps
|
PuTTY encoding: UTF-8
# LANG=FR_FR.UTF-8;od -xc French.dat
0000000 5ec2 cace d4db e2ea eef4 fb00 ^ 302 312 316 324 333 342 352 îôû ôû û |
- Results:
- The hex values in the top row are the code points for the data. In the second row, octal values are displayed, instead of characters, so this data is not UTF-8.
|
PuTTY encoding: UTF-8
# LANG=fr_FR.8859-15;od -xc French.dat
0000000 5ec2 cace d4db e2ea eef4 fb00 ^ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ |
- Results:
- Substitute characters were displayed. There are matching code points in this locale, but the characters cannot be displayed.
- Change the PuTTY encoding to ISO8859-15:
- Configuration->Window->Translation->Remote Character Set->ISO-8859-15:1999 (Latin-9, "euro") ->Apply
|
PuTTY encoding: ISO8859-15
# LANG=fr_FR.8859-15;od -xc French.dat
0000000 5ec2 cace d4db e2ea eef4 fb00 ^ Â Ê Î Ô Û â ê î ô û |
- Results:
- This data seems to be ISO8859-15 encoding.
|
# cd /usr/lib/nls/charmap
# grep CIRCUMFLEX ISO8859-15 | cut -f2 -d">" | while read myChar ; do printf "\%s" $myChar ;done # echo $myString
\x5e\xc2\xca\xce\xd4\xdb\xe2\xea\xee\xf4\xfb |
3) Now, use a simple Perl one-liner to generate a string.
|
PuTTY encoding: UTF-8
# perl -e 'print "\x5e\xc2\xca\xce\xd4\xdb\xe2\xea\xee\xf4\xfb"'
^▒▒▒▒▒▒▒▒▒▒ |
- Results:
- Substitute characters were displayed.
- "Garbage" characters could be displayed, depending on the code points, and PuTTY encoding.
- Substitute characters were displayed.
| # perl -e 'print "\x5e\xc2\xca\xce\xd4\xdb\xe2\xea\xee\xf4\xfb"' | iconv -f ISO8859-15 -t UTF-8 ^ÂÊÎÔÛâêîôû |
B) Change the PuTTY encoding.
- Configuration->Window->Translation->Remote Character Set->ISO-8859-15:1999 (Latin-9, "euro") ->Apply
|
PuTTY encoding: ISO8859-15
# perl -e 'print "\x5e\xc2\xca\xce\xd4\xdb\xe2\xea\xee\xf4\xfb"'
^ÂÊÎÔÛâêîôû |
|
PuTTY encoding: ISO-8859-15:1999
AIX locale: LANG=EN_US.UTF-8
# perl -e 'print "\x5e\xc2\xca\xce\xd4\xdb\xe2\xea\xee\xf4\xfb"' > iso8859-15.dat
# cat iso8859-15.dat
^ÂÊÎÔÛâêîôû # vi iso8859-15.dat
"iso8859-15.dat"Incomplete or invalid multibyte character, conversion failed |
Additional Information
| SUPPORT |
|---|
|
If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract. 1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue. 2. Capture any logs or data relevant to the situation. 3. Contact IBM to open a case: -For electronic support, see the IBM Support Community: 4. Provide a clear, concise description of the issue. - For more information, see: Working with IBM AIX Support: Describing the problem. 5. If the system is accessible, collect a system snap, and upload all of the details and data for your case. - For more information, see: Working with IBM AIX Support: Collecting snap data |
Related Information
Was this topic helpful?
Document Information
Modified date:
26 July 2021
UID
ibm16475321