Categories: Technical Solution | Symbian C++ | Localization | S60 1st Edition | S60 2nd Edition | S60 3rd Edition
| ID | TSS000376 | Creation date | July 7, 2006 |
| Platform | S60 1st Edition S60 2nd Edition and FP1, FP2, FP3 S60 3rd Edition | Devices | |
| Category | Symbian C++ | Subcategory |
| Keywords (APIs, classes, methods, functions): |
How do I compile non-Latin resource files?
When creating localized versions of your application, you may need to build the resource file using strings with non-Latin characters (for example, Chinese). To achieve this, do as follows:
- Create your resource file and add the CHARACTER_SET UTF8 statement.
- Save the files in UTF8 format. If the editor allows you to save the file as UTF8 without BOM ("byte order mark"), you can skip the next step.
- Use a hexadecimal editor to remove the BOM from the saved resource file (for UTF8 the BOM is 3 bytes long with the following hexadecimal content: EF BB BF).
Example:
File: ChineseDisplay.loc
CHARACTER_SET UTF8
#ifdef LANGUAGE_01
#include "Language.l01"
#endif
#ifdef LANGUAGE_31
#include "Language.l31"
#endif
File: language.l01
#define ELanguage ELangEnglish
… snip ...
#define qtn_exit "Exit"
#define qtn_test "Test"
#define qtn_hello "Hello"
… snip ...
File: language.l31
#define ELanguage ELangPrcChinese
… snip ...
#define qtn_exit "退出"
#define qtn_test "测试"
#define qtn_hello "ä½ å¥½"
… snip ...
File: ChineseDisplay.rss
NAME CHID
CHARACTER_SET UTF8
RESOURCE RSS_SIGNATURE { }
RESOURCE TBUF { buf=""; }
RESOURCE EIK_APP_INFO
{
menubar=r_ChineseDisplay_menubar;
cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
}
… snip …
RESOURCE MENU_PANE r_ChineseDisplay_menu
{
items=
{
MENU_ITEM { command=EAknCmdExit; txt=qtn_exit; },
MENU_ITEM { command=EChineseDisplayCmdTest; txt=qtn_test; },
MENU_ITEM { command=EChineseDisplayCmdHello; txt=qtn_hello; }
};
}
… snip ...
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| How to make a native py app on 3RDEd ? | Santehnik | Python | 38 | 2008-04-11 16:18 |
| [Compile Error] .rsg file can not be opened | SymNLeaner | Symbian Tools & SDKs | 6 | 2007-03-01 08:35 |
| Unable to compile HelloWorldBasic with S60 3rd edition | symbianguycpp | Symbian Tools & SDKs | 6 | 2008-04-30 09:29 |
| how to load statuspane resource? | isarc | General Symbian C++ | 9 | 2008-03-25 08:04 |
| lib .dso files missing... | GeKI | General Symbian C++ | 5 | 2006-12-01 11:07 |