#include <IGCcharacterEncoding.h>
Posix C++ plugins need not alter the default character encoding, since the only supported encoding on Posix platforms is UTF-8.
The IGC DLL character encoding is used to translate the strings passed between the plugin and IGC DLL to and from the strings passed between IGC DLL and Iguana. Strings passed between IGC DLL and Iguana are always encoded in UTF-8. Strings passed between the plugin and IGC DLL may be encoded in either UTF-8 or ANSI (on Windows only; the only encoding available on Posix is UTF-8).
For Windows C++ plugins, ANSI is the default character encoding. ANSI encoding means that the current Windows ANSI codepage is used for translation. In Win32 terminology, the CP_ACP codepage is used. This means that on a Western system, the actual encoding used might be Windows-1252, whereas on a Taiwanese system it might be Big5.
Windows C++ plugins may switch the character encoding to UTF-8 in order to properly process messages with characters outside of the current Windows ANSI codepage. For example, this would allow a Western system using the Windows-1252 codepage to process messages originally encoded in Chinese Big5.
The IGC DLL character encoding is intended to be adjusted only once per execution, before any plugin library classes are created, or plugin library functions are called. Plugin library classes use the character encoding setting in place at the time of their creation for the duration of their lifetime. Hence, changing the character encoding affects only subsequently created instances, not existing instances.
Static Public Member Functions | |
static void | SetEncoding (const char *CharacterEncoding) |
Sets the plugin library character encoding, either "ANSI" or "UTF-8". | |
static const char * | GetEncoding () |
Retrieves the plugin library character encoding, either "ANSI" or "UTF-8". |
|
Retrieves the plugin library character encoding, either "ANSI" or "UTF-8". See IGCcharacterEncoding for details. |
|
Sets the plugin library character encoding, either "ANSI" or "UTF-8". See IGCcharacterEncoding for details. |