Label::createWithBMFont and text with accents

Hi,

I’m trying to use image based fonts (with a PNG and the associated .fnt file) and to display text containing accents with it.

It does not work, the labels are not shown at all.
After investigation, I found that setString() calls StringUtils::UTF8ToUTF16() that will consider the accent as invalid character (in ConvertUTF.c) since its ASCII value is not in the range of 0x80 - 0xC2 (128 - 194).

I’m sure Cocos2d can manage this, because when I used Cocos Studio in the past, it was possible to have accents without any issue (but it was also with an older version of Cocos2d).

Any idea of what I’m missing ?

Thanks

What version are you using?

I’m using Cocos2d-x 3.3. I’m developing with C++ on Windows 7 for the moment, I plan to move to Android when my results here will be good enough.

ok, perhaps file a bug for this. I’m not sure what is actually supposed to happen.

Done #10321, wait and see.

Thank you.

Well it’s about one week nobody answered in the bug report topic. As far as I understand it, it is fully related to the Cocos2d code, so I’m hesitating to modify it myself because it might cause issues on a future update of the framework …

Well, it isn’t that nobody answered. It is that you don’t have a resolution yet :-). There have been 16 comments on the issue and the developer looking into the issue. I’d give it a few more days to see what they come up with.

OK I was wondering if it was in progress since I had some quick answers then no more :smiley:

Sorry to bump :wink: