special-characterscocos2d-xcclabelttf

Special Characters in Cocos2D-X CCLabelTTF


Hi I want to create CCLabelTTF with a string that contains special characters here is some example

CCLabelTTF* pLabelDuracion = CCLabelTTF::create("Duración de Periodo", "Arial", 20,CCSize(),kCCTextAlignmentLeft);

or

CCLabelTTF* pLabelPsswd = CCLabelTTF::create("Contraseña", "Arial", 20,CCSize(),kCCTextAlignmentLeft);

Please show me how to display this characters in my app ("ñ","´",etc)

I'm coding in visual studio 2010


Solution

  • change your cpp file encoding to UTF in visual studio