SetCharacterSerialization

This call defines how characters for names, strings will be serializaed and how they are expected to be serialized. An exception are the Open / Import / Save calls, these calls have a fixed way of serialization of path / file names.

If the encoding value is non-zero the following values are possible (if zero encoding is kept as defined)
     32   [default] encoding ignored
     64   encoding Windows 1250
     65   encoding Windows 1251
     66   encoding Windows 1252
     67   encoding Windows 1253
     68   encoding Windows 1254
     69   encoding Windows 1255
     70   encoding Windows 1256
     71   encoding Windows 1257
     72   encoding Windows 1258
    128   encoding ISO8859 1
    129   encoding ISO8859 2
    130   encoding ISO8859 3
    131   encoding ISO8859 4
    132   encoding ISO8859 5
    133   encoding ISO8859 6
    134   encoding ISO8859 7
    135   encoding ISO8859 8
    136   encoding ISO8859 9
    137   encoding ISO8859 10
    138   encoding ISO8859 11
          encoding ISO8859 12 => does not exist
    140   encoding ISO8859 13
    141   encoding ISO8859 14
    142   encoding ISO8859 15
    143   encoding ISO8859 16
    160   encoding MACINTOSH CENTRAL EUROPEAN
    192   encoding SHIFT JIS X 213

The wcharBitSizeOverride value overrides the OS based size of wchar_t, the following values can be applied:
    0   wcharBitSizeOverride is ignored, override is not changed
    16  wchar_t interpreted as being 2 bytes wide (size of wchar_t in bits)
    32  wchar_t interpreted as being 4 bytes wide (size of wchar_t in bits)
    Any other value will reset the override and wchar_t will follow the OS based size of wchar_t
Note: this setting is independent from the model, this call can also be called without a model defined.

The ascii value defines
    true  [default] 8 bit serialization (size of char returned in bits)
    false 16/32 bit serialization (depending on the operating system, i.e. sizeof of wchar_t returned in number of bits)
Note: this setting is model-dependent and requires a model present to have any effect.

The return value is the size of a single character in bits, i.e. 1 byte is 8 bits, the value for a wchar_t can be 16 or 32 depending on settings and operating system

Syntax

//
//   Strong typing definition
//
int64_t         SetCharacterSerialization(
                        OwlModel                model,
                        int64_t                 encoding,
                        int64_t                 wcharBitSizeOverride,
                        bool                    ascii
                    );


//
//   Weak typing definition
//
int64_t __declspec(dllexport) __stdcall SetCharacterSerialization(
                                                int64_t                 model,
                                                int64_t                 encoding,
                                                int64_t                 wcharBitSizeOverride,
                                                bool                    ascii
                                            );
    

Property model

Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property encoding

Size: 64 bit / 8 byte (value)
If the encoding value is non-zero the following values are possible (if zero encoding is kept as defined)
    32  [default] encoding ignored
    64  encoding Windows 1250
    65  encoding Windows 1251
    66  encoding Windows 1252
    67  encoding Windows 1253
    68  encoding Windows 1254
    69  encoding Windows 1255
    70  encoding Windows 1256
    71  encoding Windows 1257
    72  encoding Windows 1258
    128  encoding ISO8859 1
    129  encoding ISO8859 2
    130  encoding ISO8859 3
    131  encoding ISO8859 4
    132  encoding ISO8859 5
    133  encoding ISO8859 6
    134  encoding ISO8859 7
    135  encoding ISO8859 8
    136  encoding ISO8859 9
    137  encoding ISO8859 10
    138  encoding ISO8859 11
         encoding ISO8859 12 => does not exist
    140  encoding ISO8859 13
    141  encoding ISO8859 14
    142  encoding ISO8859 15
    143  encoding ISO8859 16
    160  encoding MACINTOSH CENTRAL EUROPEAN
    192  encoding SHIFT JIS X 213


Property wcharBitSizeOverride

Size: 64 bit / 8 byte (value)
The wcharBitSizeOverride value overrides the OS based size of wchar_t, the following values can be applied:
    0   wcharBitSizeOverride is ignored, override is not changed
    16  wchar_t interpreted as being 2 bytes wide (size of wchar_t in bits)
    32  wchar_t interpreted as being 4 bytes wide (size of wchar_t in bits)
    Any other value will reset the override and wchar_t will follow the OS based size of wchar_t


Property ascii

Size: 8 bit / 1 byte (value)
The ascii value defines
    true  [default] 8 bit serialization
    false  16/32 bit serialization