由于SymbianOS操作系统用的是统一的Unicode,所以我们把资源文件改为中文后会出现乱码,但我们如何解决呢?
其实很简单,我们只要把资源文件中的中文用Word或IE等转换成UTF8,再加上CHARACTER_SET UTF8 就OK了,如下:
-----------------原代码如下:----------------
#include
#include "my.hrh"
#include "my.loc"
#include
#include
#include
RESOURCE CBA r_softkeys_Login_Exit
{
buttons =
{
CBA_BUTTON
{
id = EAknSoftkeyLogin;
txt = "登录";
},
CBA_BUTTON
{
id = EAknSoftkeyBack;
txt = "退出";
}
};
}
-------------转换之后:--------------
CHARACTER_SET UTF8
NAME AWIZ
// INCLUDES
#include
#include "my.hrh"
#include "my.loc"
#include
#include
#include
RESOURCE CBA r_softkeys_Login_Exit
{
buttons =
{
CBA_BUTTON
{
id = EAknSoftkeyLogin;
txt = "鐧诲綍"; //UTF8
},
CBA_BUTTON
{
id = EAknSoftkeyBack;
txt = "閫€鍑?; //UTF8
}
};
}
由于SymbianOS操作系统用的是统一的Unicode,所以我们把资源文件改为中文后会出现乱码,但我们如何解决呢?
其实很简单,我们只要把资源文件中的中文用Word或IE等转换成UTF8,再加上CHARACTER_SET UTF8 就OK了,如下:
-----------------原代码如下:----------------
#include
#include "my.hrh"
#include "my.loc"
#include
#include
#include
RESOURCE CBA r_softkeys_Login_Exit
{
buttons =
{
CBA_BUTTON
{
id = EAknSoftkeyLogin;
txt = "登录";
},
CBA_BUTTON
{
id = EAknSoftkeyBack;
txt = "退出";
}
};
}
-------------转换之后:--------------
CHARACTER_SET UTF8
NAME AWIZ
// INCLUDES
#include
#include "my.hrh"
#include "my.loc"
#include
#include
#include
RESOURCE CBA r_softkeys_Login_Exit
{
buttons =
{
CBA_BUTTON
{
id = EAknSoftkeyLogin;
txt = "鐧诲綍"; //UTF8
},
CBA_BUTTON
{
id = EAknSoftkeyBack;
txt = "閫€鍑?; //UTF8
}
};
}