2.37 .codepage
This attribute defines the code page used to call application functions of the application object.
Definition
-
Data type
enum
-
Access
get, set
-
changed event
yes

-
C
Data type: DT_enum
-
COBOL
Data type: DT-enum
-
Inheritance
yes
-
Classification
object-specific attribute
-
Objects
By setting this attribute, the IDM application code page is redefined for the time of the call, which otherwise can only be achieved by using the IDM interface function DM_Control with the action DMF_SetCodePage.
As an alternative to using this attribute, DM_Control with the application object specified may also be used.
By using an application-specific code page, it is thus quite simple to achieve the division of application functions that require strings in different encodings.
Dynamic transition of this attribute, not only while the application is activated, is strongly discouraged. If application functions with record parameters are called using dynamic binding, the record definition (C header or COBOL copy file) should match.
Value range
- cp_acp
-
Currently used ANSI code page of an application on Microsoft Windows.
Availability
Only on Microsoft Windows.
- cp_ascii
-
ASCII character encoding.
- cp_cp1252
-
Western European character encoding according to Microsoft Windows code page 1252.
- cp_cp437
-
English character encoding according IBM code page 437 (MS-DOS).
- cp_cp850
-
Western European character encoding according to IBM code page 850 (MS-DOS).
- cp_dec169
-
Character encoding according to DEC code page 169.
- cp_euc
-
Character encoding according to
Extended Unix Code
(EUC). - cp_hp15
-
Western European 16-bit character encoding used by HP systems.
- cp_iso6937
-
Western European character encoding with variable length according to ISO 6937.
- cp_iso8859
-
Western European Latin-1 encoding according to ISO 8859-1.
- cp_jap15
-
Japanese 16-bit character encoding used by HP systems.
- cp_kor15
-
Korean 16-bit character encoding used by HP systems.
- cp_prc15
-
Traditional Chinese 16-bit character encoding used by HP systems.
- cp_roc15
-
Simplified Chinese 16-bit character encoding used by HP systems.
- cp_roman8
-
8-bit character encoding according to HP code page Roman-8.
- cp_ucp
-
User Code Page
; conversion to an arbitrary user-defined code page with iconv() by DM_ControlEx with the action DMF_SetUserCodePage.Availability
Only on Unix/Linux systems. On Microsoft Windows, non-displayable characters are converted to
?
- cp_utf16
-
16-bit Unicode encoding with character widths from 2 up to 4 bytes.
There are two variants:
- BE – big-endian, bytes with higher numerical significance first.
- LE – little-endian, bytes with lower numerical significance first.
UTF-16 without a specified byte order corresponds to the LE variant on Microsoft Windows and to the BE variant on Unix/Linux systems.
- cp_utf16b
-
16-bit Unicode encoding with character widths from 2 up to 4 bytes in the BE variant (big-endian, bytes with higher numerical significance first).
This is the default for UTF-16 on Unix/Linux systems.
- cp_utf16l
-
16-bit Unicode encoding with character widths from 2 up to 4 bytes in the LE variant (little-endian, bytes with lower numerical significance first).
This is the default for UTF-16 on Microsoft Windows.
- cp_utf8
-
8-bit Unicode encoding with variable length, corresponds to ASCII encoding in the range 0 – 127.
- cp_utfwin
-
16-bit Unicode encoding like cp_utf16l with conversion of line breaks \r\n → \n.
- cp_wcs
-
Wide Character String
(data type wchar_t*) character encoding, depending on the system and the locale used. - cp_winansi
-
Microsoft Windows character encoding.
Remark
It should be noted that the code page is not forwarded to a DDM server application. On the DDM server side, it has already been possible to set the code page using DM_Control.
Availability
See also
Chapter “Dynamic Binding of Record Functions” in manual “C Interface - Basics”
Chapter “Dynamic Binding of Record Functions” in manual “COBOL Interface”
Command line option +writeheader
Setting the Codepage by “DMF_SetCodePage” im Handbuch “C Interface - Functions”
Setting an userdefined Codepage DM_ControlEx im Handbuch “C Interface - Functions”