CL_ABAP_CONV_OBJ,这个类可以执行对字符的代码页转换。
常用的代码页有:
1100:英文标准 ISO8859-1
4110:Unicode UTF-8
8400:中文 GB2312
8401:中文 GB18030
代码页编码的定义如下:
Code
Definition
The 4-character name of an SAP character set as defined in SAP character set maintenance.
The following explains the naming convention in more detail:
First digit: Code
0 EBCDIC character sets
1 ASCII character sets
2 mixed single byte / double byte character sets
4 double-byte character sets
6 mixed character sets
8 double byte and multibyte character sets
9 reserved for code pages you define
Second digit: Country
1-3 countries that use the Latin alphabet (Western Europe, North and South America, Australia, Africa)
4-6 countries that use non-Latin alphabets and writing systems (Eastern Europe, Asia, Arabic countries in Africa)
7-9 reserved for special languages
Third and fourth digits: Sequential number
Definition
The 4-character name of an SAP character set as defined in SAP character set maintenance.
The following explains the naming convention in more detail:
First digit: Code
0 EBCDIC character sets
1 ASCII character sets
2 mixed single byte / double byte character sets
4 double-byte character sets
6 mixed character sets
8 double byte and multibyte character sets
9 reserved for code pages you define
Second digit: Country
1-3 countries that use the Latin alphabet (Western Europe, North and South America, Australia, Africa)
4-6 countries that use non-Latin alphabets and writing systems (Eastern Europe, Asia, Arabic countries in Africa)
7-9 reserved for special languages
Third and fourth digits: Sequential number