TrnsDt and WinCpTranslateString
For code translation between host and PC code pages, you have two alternatives,
TrnsDt and WinCpTranslateString. (GET_CP_CONVERT_TABLE
does not support DBCS.) The following information will help you decide
which alternative to choose.
- TrnsDt uses the default code conversion tables
of CDRA (Character Data Representation Architecture) and gives you the same
result as 3270 File Transfer and EHLLAPI of DBCS OS/2.
- TrnsDt has an option to keep the pseudo SO/SI
in PC code pages while WinCpTranslateString does not. This capability
could be of use when you handle column-sensitive host data on PC.
- TrnsDt translates control codes to control
codes as much as possible while WinCpTranslateString translates all
control codes to the substitution character.
- When the target buffer is not long enough, TrnsDt
returns an error code while WinCpTranslateString does not.
- WinCpTranslateString is for presentation manager
applications and a common function to SBCS and DBCS OS/2 PM while TrnsDt
can be called by any type of OS/2 applications though it is a DBCS OS/2
unique function.
The following are other differences.
- WinCpTranslateString supports translations
between PC code pages while TrnsDt does not.
- The PC and host SBCS substitution characters of the
TrnsDt are 7FH and 3FH respectively, while that of the WinCpTranslateString
is FFH, the same as SBCS OS/2's. (Note the following exceptions: since
the code page Japanese - PC Extended and T-Chinese - PC Extended
have tilde at FFH, their substitution characters are 7FH.)
[Back: TrnsDt]
[Next: 3270 Emulator]