Examples
The same mixed date character string can be represented as character and hexadecimal data in different encoding schemes.
For the same mixed data character string, the following table shows character
and hexadecimal representations of the character string in different encoding
schemes. In EBCDIC, the shift-out and shift-in characters are needed to delineate
the double-byte characters.
Data type and encoding scheme | Character representation | Hexadecimal representation (with spaces separating each character) |
---|---|---|
9 bytes in ASCII | 8CB3 67 65 6E 8B43 6B 69 | |
13 bytes in EBCDIC | 0E 4695 0F 87 85 95 0E 45B9 0F 92 89 | |
11 bytes in Unicode UTF-8 | E58583 67 65 6E E6B097 6B 69 |
Because of the differences of the representation of mixed data strings in ASCII, EBCDIC, and Unicode, mixed data is not transparently portable. To minimize the effects of these differences, use varying-length strings in applications that require mixed data and operate on ASCII, EBCDIC, and Unicode data.