Hi Argas, I tested UserDefaultTest.cpp, and it results ok and not faced with your problem. But I guessed your file path was wrong, there is a “;5:A59” in your path and I guess the system couldn’t recognized it. When I created a folder, couldn;t use “:” in path. Thanks.
I have exactly the same problem - and the reason is cyrillic windows username. It becomes ugly (for example - “;5:A59” instead of something like “Артём”) after convertion in CCWinRTUtils.cpp in method
std::string PlatformStringToString(Platform::String^ s)
So I’m not able to use CCUserDefault::sharedUserDefault() at all, application fails. Any ideas on this?
This is a cocos2d-x bug. It doesn’t handle non-ASCII usernames properly. I filed a bug report and noticed another person also did but it seems to be low priority (odd considering this project originated in China). You are lucky your app doesn’t crash and burn like mine did. To fix this, you need to edit the “PlatformStringToString” function inside of CCWinRTUtils.cpp. Here is mine