CCDictMaker::textHandler bug when using chinese&ansi compositive text

when I use chinese&ansi compositive key (MJ-牌.png) in plist files, the key result is 牌.png.

modification is in platform/CCFileUtilsCommon_cpp.h:

void startElement(void ctx, const charname, const char **atts)
{
….
LINE165: else if(sName == “key”)
{
m_tState = SAX_KEY;
m_sCurKey.clear(); // <— added.
}

}

void textHandler(void ctx, const charch, int len)
{

LINE297: switch(m_tState)
{
case SAX_KEY:
//m_sCurKey = pText->getCString(); // <— modified.
m_sCurKey.append(pText->getCString()); // <— modified.
break;

}

please confirm it, thanks!

BTW: cocos2dx is a great framework, thanks!


CCFileUtilsCommon_cpp.h.zip (3.1 KB)