[3.0 rc0] Label has problem.. with UTF8

I’m Korean…
I use new Label in 3.0 rc0 with Korean Language…

Then I saw broken characters… in the screen… :;qst

so I must use converting code function…

It’s too inconvenient.


002.PNG (220.3 KB)


003.PNG (219.3 KB)

load str from external file eg.xml sqlite…

Um… You don’t understand my problem.

I worte code …
auto label = LabelTTF::create("Hello 이재환", "Arial", 24); label->setPosition(Point(240, 260)); this->addChild(label, 1);

Result is broken character in the screen…

Hello ?댁옱???띻만??

it may caused by msvc cpp file encoding.

try below.

std::string str = “Hello 이재환”;
log("%s", str.c_str());

if console prints incorrectly, change your cpp file encoding.

Yep, it is better to use xml file to record characters to avoid encoding problem caused by IDE.

Windows7, Visual C++ Express 2013, Korean Language

In first my projects, I wrote code…
auto label = LabelTTF::create("Hello 이재환", "Arial", 24); label->setPosition(Point(240, 260)); this->addChild(label, 1);

In the screen, I saw broken character…

But, In the Mac & Xcode… Letter (Korean Language ) is properly seen.

This error which doesn’t happen in the previous version

=======================================================


@gikimirane can you give me a demo to yuye.liu@chukong-inc.com.
and I’ll check it for you

@yuye
I wrote a mail. :slight_smile:

@gikimirane ok,I’ll try to help you