Coco2dx development in vs displays Chinese/Chinese garbled characters

Source: Internet
Author: User

I have read a lot of posts saying it cannot be displayed, or it is a bug,

But why is the Chinese "China" output in the test project?

Later I found it very simple.

Just convert the file to the UTF-8 encoding format

ANSI encoding is generated by default.

It is worth noting that,Don't change the encoding when opening vs, so it's time for the UTF-8 to reload it into ANSI

But it seems that you can not use the notebook open to save as a UTF-8, because he will save to the UTF-8 + BOM format, the same display garbled

Then I use ultraedit or editplus to open and save it as a non-bom

Add segment code

Cclabelttf * plable = cclabelttf: Create ("I am a Chinese", "marker felt", 30); plable-> setposition (CCP (size. width/2, size. height/2); this-> addchild (plable );

Run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.