SetCodePage


The SetCodePage method sets code page used for Unicode conversion. By default ANSI code page is used.
C++
void SetCodePage(
  long CodePage                  // code page identifier
);
BASIC
SetCodePage(
  CodePage As Codepage           // code page identifier
)

Parameters

CodePage
Identifier of the code page that is used to perform conversion between ANSI and Unicode text.
This parameter can be given the value of any code page that is installed or available in the system.
See Windows SDK documentation for description of code page and commonly used identifiers.

You can also specify one of the following values:

IXF_CODEPAGE_ANSI ANSI code page,
IXF_CODEPAGE_OEM OEM code page,
IXF_CODEPAGE_MAC MAC code page,
IXF_CODEPAGE_THREAD ANSI code page of the current thread,
IXF_CODEPAGE_SYMBOL SYMBOL code page,
IXF_CODEPAGE_UTF7 UTF-7 translation,
IXF_CODEPAGE_UTF8 UTF-8 translation.

Return Values

Method has no return value.

Remarks

Conversion between ANSI and Unicode takes place whenever text data passed to the IXFile method has different encoding than data which this method operates on. All IXFile methods with text parameters are available in two versions - ANSI and Unicode. Both versions of the method can be used on Unicode and non-Unicode systems depending on your needs because type of text encoding used is determined solely by functionality of the method but not by version of the method. If parameter passed to the method is encoded differently, it is converted to appropriate format. By default ANSI code page is used for conversion; GetCodePage can be used to retrieve identifier of the active code page.

Unicode conversion should not be confused with Unicode system calls or Unicode text data; see Unicode Support for more information.

See Also

GetCodePage, Unicode Support