Web Development

General discussion


How to display chinese font with C++ 5.0

By lissey70 ·
I am working on an application in an industrial environment that will require messages to be displayed in both English and Chinese characters. I am researching a couple of methods, but I am wondering if someone has already come across a need for this functionality. If anyone has any suggestions for methods to employ or easy training recommendations, I would greatly appreciate it. I hate to have to reinvent the wheel here.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by T. E. Walker In reply to How to display chinese fo ...

This may or not be helpful depending on what you're doing, but in several environments I have to display information in multiple languages, including Chinese (simplified and Big5), Cyrillic, Japanese... These are all multi-byte languages, and the best solution I have found by far, is using utf-8 encoding for all displayed content in a table (contentOne|hello kind of thing) for each language, and then specifying the language resource according to language desired. This is for displayes with all one language. You set the language desired at first, then pull from the correct resource table or field in that table depending on how you structure it. If you need two languages at once, and no more, its even easier (helloEnglish|helloChinese type data.) The point of using utf-8 or any Unicode type encoding that works for your environment is that it will display multiple languages without having to recode displays, and can you display multiple languages at once without garbage data. A hash table in your code should do it, or you can use an external file for ease of maintenence, depending on how you want the final product to work. I parse my content into a database in my application. I like EmEditor for working with the content and encoding it to utf-8, but you can use whatever you're comfortable with.

-Hope this helped, I didn't really have a lot of detail on your application so I'm not sure I covered everything you needed to know.

Related Discussions

Related Forums