IMLangCodePages::GetCharCodePages method

Gets the set of code pages that the given Unicode character belongs to.

Syntax

HRESULT GetCharCodePages(
  [in]  WCHAR chSrc,
  [out] DWORD *pdwCodePages
);

Parameters

  • chSrc [in]
    The source Unicode character for which the client wants a set of code pages.

  • pdwCodePages [out]
    A pointer to an unsigned long integer where the set of code pages that contains chSrc is returned.

Return value

Returns S_OK if successful, or an error value otherwise.

Remarks

See IMLangCodePages for more information about sets of code pages.

A Unicode character can belong to multiple code pages. For example, the Unicode character U+5B57 belongs to the Japanese (932) code page, the Korean (949) code page, the Simplified Chinese (936) code page, and the Traditional Chinese (950) code page. GetCharCodePages determines which code pages a given Unicode character belongs to. For the character U+5B57, four bits (those corresponding to the preceding code pages) in pdwCodePages would be set to 1. The actual code page identifier values corresponding to the set pdwCodePages can then be retrieved by using the IMLangCodePages::CodePagesToCodePage method.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mlang.h

IDL

Mlang.idl

DLL

Mlang.dll

See also

IMLangCodePages

IMLangCodePages::GetStrCodePages