Export (0) Print
Expand All

TranslateCharsetInfo (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function translates based on the specified character set, code page, or font signature value, setting all members of the destination structure to appropriate values.

UINT TranslateCharsetInfo( 
  DWORD FAR* lpSrc, 
  LPCHARSETINFO lpCs, 
  DWORD dwFlags 
);

Parameters

lpSrc
[in] A long pointer to a code page bitfield or a value as defined by the dwFlags parameter.

If dwFlags is TCI_SRCFONTSIG, this parameter is the address of the fsCsb member of a FONTSIGNATURE structure. Otherwise, this parameter is a 32-bit value.

lpCs
[out] Long pointer to a CHARSETINFO structure that receives the translated character set information.
dwFlags
[in] A bitmask of translation flags, set to one of the values in the following table.
ValueDescription
TCI_SRCCHARSETSource contains the character set value in the low word, and zero in the high word.
TCI_SRCCODEPAGESource is a code-page identifier in the low word and zero in the high word.
TCI_SRCFONTSIGSource is the code-page bitfield portion of a FONTSIGNATURE structure.

On input, you set one bit.

Choose from the ANSI range (bits 0-15), the combined ANSI and OEM range (bits 16-31), or the OEM range (bits 32-63).

On output, the structure has only one bit set.

If the TCI_SRCFONTSIG value is given, the lpSrc parameter must be the address of the code-page bit field.

If any other TCI_* value is given, the lpSrc parameter must be a value, not an address.

Return Values

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

OEM code pages are not supported.

Character sets, code pages, and font signature bitmaps supported by Windows CE are shown in the following table.

Character setsCode pagesFont signature bitmaps
ANSI_CHARSET1252FS_LATIN1
SHIFTJIS_CHARSET932FS_JISJAPAN
HANGEUL_CHARSET949FS_WANSUNG
JOHAB_CHARSET1361FS_JOHAB
GB2312_CHARSET936FS_CHINESESIMP
CHINESEBIG5_CHARSET950FS_CHINESETRAD
HEBREW_CHARSET1255FS_HEBREW
ARABIC_CHARSET1256FS_ARABIC
GREEK_CHARSET1253FS_GREEK
TURKISH_CHARSET1254FS_TURKISH
BALTIC_CHARSET1257FS_BALTIC
EASTEUROPE_CHARSET1250FS_LATIN2
RUSSIAN_CHARSET1251FS_CYRILLIC
THAI_CHARSET874FS_THAI

The table entries are ordered exactly as they are translated.

For example, specifying lpSrc as HANGEUL_CHARSET and dwFlags as TCI_SRCCHARSET fills CHARSETINFO with HANGEUL_CHARSET, code page 949, and FS_WANSUNG.

Specifying lpSrc as code page 936 and dwFlags as TCI_SRCCODEPAGE fills CHARSETINFO with GB2312_CHARSET, code page 936, and FS_CHINESESIMP.

On output, the fsUSB and fsCsb members of the FONTSIGNATURE structure (specified by the fs member of the CHARSETINFO structure) are zero-filled before setting the returned code-page bitfield value.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Wingdi.h.
Link Library: Coredll.lib.

See Also

CHARSETINFO | FONTSIGNATURE


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft