CCLabelBMFont problems when using plist

I have an question with CCLabelBMFont.

When I use:

CCLabelBMFont * pLabel = CCLabelBMFont::labelWithString("hello \n world","test.fnt"); 

Everything works fine.

But if I get the words from a plist, the “world” doesn’t start from a new line, only print out “hello world”, here is the code:

CCMutableDictionary *localDic = new CCMutableDictionary();
localDic = CCFileUtils::dictionaryWithContentsOfFile(fileName);
CCString* s = (CCString*)localDic->objectForKey("testkey");   // the value for 'testkey' is "hello \n world"
pLabel = CCLabelBMFont::labelWithString(s->toStdString().c_str(), "test.fnt");

I’m using cocos2d-1.0.1-x-0.13.0, thanks for help.

try this,
be late about 8 months…

const char* Strings::getValue(const char* key)
{
if(strings NULL)
strings = CCDictionary::createWithContentsOfFile(“strings.xml”);

CCString\* sValue = (CCString\*) strings-\>objectForKey(key);
if(sValue)
{
    std::string sString = sValue-\>m\_sString;
    char sRet[1024];

    int index = 0;
    for(int i = 0; i \< sString.size(); i++)
    {
        char temp1 = sString[i];
        char temp2 = sString[i+1];

        if(temp1  ‘’ && temp2 == ‘n’)

{
sRet[index] = ‘’;
i**;
}
else
sRet[index] = temp1;
index**;
}
sRet[index] = ‘’;

return CCString::create(sRet)->m_sString.c_str();
}
else
return key;
}

Use option+enter instead of to generate new line in plist.