5250 code pages and CCSIDs
How IBM i converts text, what CCSID 37 and 65535 mean, and why symbols can look wrong.
IBM i stores text in EBCDIC and tags it with a CCSID (coded character set identifier). The Telnet server converts between the job's CCSID and the client's character set.
Where CCSIDs are set
- The system value QCCSID: the system default.
- The user profile (CCSID) and the job.
- The file: each file field can carry its own CCSID.
CCSID 37 is US English. 65535 means "no conversion": the data is treated as bytes. If a system uses 65535, text can look wrong when an application tries to display it. Administrators set the job or user CCSID to the right value to fix it.
What the client picks
With TN5250E the client says which code page and character set it wants through the NEW-ENVIRON option (CODEPAGE and CHARSET variables). If the client and the host disagree, characters outside the plain alphabet look wrong.
Pick the page that matches your host:
- 37 US and many others.
- 273 German, 285 UK, 297 French, and so on.
- The euro versions of those pages. See EBCDIC code page list.
Symptoms
- A pound sign, brackets, at sign or dollar sign turns into a different symbol.
- Accented letters show wrong. This usually means the wrong national page.
- Question marks or squares appear. The terminal could not map the character.
Double-byte languages
Japanese, Chinese and Korean sessions use DBCS CCSIDs such as 930 (Japanese) and 935 (Chinese). They need a client and a font that support them.