Today, we will mainly describe the DB2 database CODESET in Linux. If you are interested in the actual operations related to the DB2 database CODESET in Linux, you can click to view the following articles. The following describes the specific solution and hope it will be helpful for your future study.
1. VARCHAR length refers to the number of bytes,
When the CODESET of DB is UTF8, the Chinese characters are entered. The Kana includes lowercase Kana, which occupies three bytes and the characters in the ASCII character set constitute one byte.
Database CODESET is IBM-943, Chinese characters and uppercase Kana are 2 bytes, lowercase Kana and ASCII character set of the characters accounted for 1 byte
2. in linux, DB2 database-tvf xx. SQL and import commands
Multi-byte characters in the file are not encoded. If the file encoding is inconsistent with the database codeset, it will be garbled.
However, when you execute the preceding commands in a windows command line, the file encoding is automatically converted to the database encoding.
The file is encoded as UTF8, and the database is UTF8. It is normal when LANG is set to ja_JP.UTF8! (The message to be sent to TTerm is also UTF8)
3. SJIS and JIS
JIS does not support Chinese characters?
4. When creating a full-width file name file from the ftp client and the telnet client, the specified email sending code will be used.
The full-width file name can be displayed normally only when the correct email sending encoding is specified.
5. the java client program can correctly identify complex data based on the database encoding.
6. Terminal text encoding and LANG environment variables, as well as the encoding used by the database.
The text encoding of the terminal controls the encoding when the text is displayed and the encoding used when the text is sent to the trusted user
LANG environment variables are read by the system and applications, specifying the language environment and the text encoding used in the memory
The encoding used by the database to save the CHARACTER data, including CHARACTER and VARCHAR.
When reading the file list, when the encoding used by the file name is incompatible with the LANG environment variable, the file name will be converted to question mark (?).
When the encoding used by the file name is inconsistent with the terminal text encoding, the file list is garbled.
The above content is about the DB2 database CODESET2009-07-10 in Linux 10:. VARCHAR length refers to the introduction of the number of bytes, hope you have some gains.