Aw string set MBCS codepage

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 5.0
SDKbuild 80


void aw_string_set_MBCS_codepage (unsigned int codepage)

Description

Sets the codepage used for passing string attributes to and from the SDK.

Callback

None

Notes

As of version 5.0, the SDK will use UTF-8 encoded strings internally and when communicating with servers.

The codepage translation to UTF-8 has been added for backwards compatibility. If an SDK application is kept using ASCII and extended ASCII character sets only, then a codepage should be provided, in order to have the SDK translating codepage specific characters to UTF-8 (Unicode) characters. If the codepage is set to UTF-8, no translation will occur and the SDK assumes all characters passed to aw_string, aw_string_set, aw_world_attribute_set and aw_world_attribute_get are already translated to UTF-8.

If only ASCII characters are used in chat and for world names, etc, no translation whatsoever is requried as all American English characters are identically in the standard ASCII set (hex 0 to hex 7f) and the UTF8 set.

This method has no meaning if the SDK application is compiled with the UNICODE compiler setting (which is default for many compilers) and your application is capable handing WCHAR (wide characters).

Note that if this method is not called then the SDK will assume that the default codepage of the system is being used.

Arguments

codepage
Codepage to be used.

Argument attributes

None

Return values

None

Returned attributes

None

Usage

aw_string_set_MBCS_codepage (932); /* Japanese Character Set - Hiragana */

See also