Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

String conversion helper functions

Helper functions that convert UTF-8 input strings into strings with different encoding.

All these helper functions require "clean" UTF-8 input strings, which they convert into strings that have the following encoding:

Conversion helper function Encoding of output string
UTF16_EncString

UTF-16. This has the same effect as calling: EncStringRscData(AEE_ENC_UNICODE, "my string")

UTF8_EncString UTF-8 (Takes no action.)
EUC_KR_EncString KSC5601, as defined by:
Name: Unified Hangeul(KSC5601-1992) to Unicode table
Unicode version: 2.0
Table version: 1.0
Table format: Format A
Date: 07/24/95
EUC_CN_EncString

GngB2312-80, as defined by:

Name: GB2312-80 to Unicode table
 (complete, hex format)
Unicode version: 3.0
Table version: 1.0
Table format: Format A
Date: 1999 October 8

SJIS_EncString

SJIS, as defined by:

Name: Shift-JIS to Unicode
Unicode version: 1.1
Table version: 0.9
Table format: Format A
Date: 8 March 1994
Authors: Glenn Adams 
John H. Jenkins 

Example

The following code sample converts a UTF-8 string located in a file called MyResource.h into a Shift-JIS encoded string:

Include "MyResource.h"
include "AEEResType.h" -- Need to include to use RESTYPE_XXX for
type.
ModRsc {
id = IDS_MyString,
type = RESTYPE_ENCSTRING,
data =SJIS_EncString("Brew MP ########"),
}