Re: The string display in diferent language system.
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org, Johnson Zhao <tianqi1981 gmail com>
- Cc:
- Subject: Re: The string display in diferent language system.
- Date: Thu, 22 Sep 2005 23:43:08 +0100
On Thursday 22 September 2005 08:29, Johnson Zhao wrote:
> Hello, Everybody
>
> I have written a application to display different languages, like English,
> Chinese or others. the application is running well. I use gtkmm, mingw and
> dev-cpp on windows.
>
> If I run the application in Chinese environment Windows XP, the Chinese
> chacarters displayed well, but in English environment is not.
>
> I wrote the code like this:
>
> Gtk::MessageDialog dialog(*this, "Test the Chinese string.");
> Glib::ustring mystring = "this is my string in Chinese, 测试中文字符串的显示";
> dialog.set_secondary_text(Glib::locale_to_utf8(mystring));
>
> I know that gtk display the text in utf-8, so I think it will display the
> same thing in different environment. Why it displayed bad character. Is
> there any errors in my understand? and how can I do this?
1. If you are hard-coding the language string into your code, why are you
calling Glib::locale_to_utf8(), as it cannot be locale dependent?
2. What are you trying to do with Gtk::MessageDialog::set_secondary_text()?
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]