0

I want to write a program with GUI, so I use FLTK. But the Chinese display as "????" in Ubuntu Linux. WinXP is OK.

I know FLTK support UTF8, and I guarantee the code sources is UTF8.

What I should Do? Change system settings or change my C++ code?

Thanks!

easyeagel
  • 83
  • 5
  • Can you create a [SSCCE](http://sscce.org/) to show us what you do? – Some programmer dude Aug 14 '12 at 08:25
  • Did you try the `utf8` demo application? You need to show us the code you wrote that produced those "????" chars... Without the code we will not be able to tell you what you do wrong, or whether there is a bug in FLTK (I remember people showing chinese FLTK apps, so it definitely works). – DejanLekic Aug 15 '12 at 14:58
  • my app is very simple, just change the **ask** demo, change the English string to Chinese string. And I guarantee the **utf8** demo work **wrong** in my Ubuntu system. – easyeagel Aug 17 '12 at 12:55

1 Answers1

0

add code in main:

putenv("LANG=zh_CN.UTF-8");

and make sure your environment haven't other about "UTF-8"'s setting