The CodePage property allows the xtra to be used in multilingual environment.
Director uses MBCS (Multibyte Character Set). Every character is encoded by one or two bytes. The encoding is based on the particular code page number.
Many COM Automation applications store text data in Unicode encoding (Office, Databases etc.). Unicode text does not rely on the current code page setting, since every character is encoded by two bytes.
This property defines particular code page number to be used in text conversion routines of the xtra.
By default, the CodePage property is 0 - ANSI code page. It defines the default behavior for the system.
The CodePage property affects all text conversion operations initiated by this instance of the wrapper. All wrappers created by this wrapper inherit the value of CodePage property. In other words, all VbScriptXtra wrappers created by xtra-level method CreateObject get the default value of the code page, which is zero. Wrapper instances derived from some wrapper instance inherit the code page setting.
Take care when changing the default value of this property, since inappropriate code page number may result in empty string as a result of text conversion. Below is the list of possible code page numbers:
|