Author Topic: Gtk+ Utf-8/chinese Problem?  (Read 5416 times)

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« on: January 02, 2006, 11:28:27 am »
problem:
can't see chinese(in utf-8) content and filename in gtk applications (xmms)

but can see them properly in qt applications (justreader) and gtk2 (gvim)

environment:
SL6000L, running pdaxrom 1.1.0beta1,
installed firefly ttf font(utf-8), and firefly(iso10646), taipei(big5) pcf font
installed locale: glibc-locale-zh-hk.utf-8, glibc-locale-zh-tw.utf-8
LC_CTYPE=zh_TW.UTF-8
LC_COLLATE=zh_TW.UTF-8
.gtkrc: set to firefly iso10646 font

detail description:
I think it's a gtk problem, since when I was using xmms playlist to add song, the chinese utf-8 filename can't display properly. Although i still can add those files into playlist, the playlist also can't display them correctly.

I've tried to set .gtkrc and xmms to use iso10646 and big5 font, no luck!
However when using JustReader2, which is a QT apps, with setting to use the utf-8 ttf font, i can browse the chinese file (utf-8), and can read the content (ebook, big5). I've also succeed to browse the chinese file in KDE using the default file manager.

So is it a GTK+ problem? Any workaround?
Or is there any QT based mp3 player?
« Last Edit: January 04, 2006, 01:23:11 am by eddiectc »

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #1 on: January 02, 2006, 11:38:12 am »
Quote
problem:
can't see chinese(in utf-8) content and filename in gtk applications (xmms)

but can see them properly in qt applications (justreader)

environment:
SL6000L, running pdaxrom 1.1.0beta1,
installed firefly ttf font, and firefly, taipei pcf font
LC_CTYPE=zh_TW.utf-8
LC_COLLATE=zh_TW.utf-8
.gtkrc: set to firefly iso10646 font

detail description:
I think it's a gtk problem, since when I was using xmms playlist to add song, the chinese utf-8 filename can't display properly. Although i still can add those files into playlist, the playlist also can't display them correctly.

I've tried to set .gtkrc and xmms to use iso10646 and big5 font, no luck!
However when using JustReader2, which is a QT apps, with setting to use the utf-8 ttf font, i can browse the chinese file (utf-8), and can read the content (ebook, big5). I've also succeed to browse the chinese file in KDE using the default file manager.

So is it a GTK+ problem? Any workaround?
Or is there any QT based mp3 player?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109215\"][{POST_SNAPBACK}][/a][/div]
It seems you didn't install the Chinese locale from the feed. Have you done this?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #2 on: January 02, 2006, 11:39:20 am »
Quote
It seems you didn't install the Chinese locale from the feed. Have you done this?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109218\"][{POST_SNAPBACK}][/a][/div]


Yes, I did. Just forgot to mention this,
I've installed the zh_TW.utf8 and zh_HK.utf8 locale

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #3 on: January 02, 2006, 11:44:12 am »
The two variables should be
Code: [Select]
LC_CTYPE=zh_TW.UTF-8
LC_COLLATE=zh_TW.UTF-8
not utf-8, it's case-sensitive.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #4 on: January 02, 2006, 11:50:04 am »
Quote
The two variables should be
Code: [Select]
LC_CTYPE=zh_TW.UTF-8
LC_COLLATE=zh_TW.UTF-8
not utf-8, it's case-sensitive.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109221\"][{POST_SNAPBACK}][/a][/div]

Yes...You're right. But I've already set it correctly like you said, just typo here...sorry for the inconvenience

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #5 on: January 02, 2006, 12:01:39 pm »
Try the following and see if it works
Code: [Select]
LC_ALL=zh_TW.UTF-8
LANG=zh_TW.UTF-8
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #6 on: January 02, 2006, 12:07:23 pm »
Quote
Try the following and see if it works
Code: [Select]
LC_ALL=zh_TW.UTF-8
LANG=zh_TW.UTF-8
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109224\"][{POST_SNAPBACK}][/a][/div]

tried, no luck

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Gtk+ Utf-8/chinese Problem?
« Reply #7 on: January 02, 2006, 05:15:12 pm »
XMMS is a gtk 1.2 application (not GTK 2.0). GTK 1.2 don't use TTF.

You need to install Chinese pcf fonts and select the font in the preference of XMMS in order to display the Chinese characters.

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #8 on: January 02, 2006, 08:28:42 pm »
Quote
XMMS is a gtk 1.2 application (not GTK 2.0). GTK 1.2 don't use TTF.

You need to install Chinese pcf fonts and select the font in the preference of XMMS in order to display the Chinese characters.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109252\"][{POST_SNAPBACK}][/a][/div]

yes, I did. I have installed chinese and utf-8 pcf fonts, but it just didn't work.
the "browse file" widget can't show the utf-8 filename properly, i think it's not related to xmms but gtk+1.2.

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #9 on: January 03, 2006, 09:33:18 am »
I think GTK2 applications work find with utf-8 encoding & truetype font.
So is there any GTK2 based mp3 player for Z?

i just can find one, but not yet port to Z...
http://bmpx.beep-media-player.org
« Last Edit: January 03, 2006, 09:33:54 am by eddiectc »

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Gtk+ Utf-8/chinese Problem?
« Reply #10 on: January 03, 2006, 09:37:08 am »
Where are your files stored? on a fat partition?

maybe this partition should be remounted with iocharset=utf8?
« Last Edit: January 03, 2006, 09:37:22 am by pgas »
SLC-860 cacko / senao wifi

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #11 on: January 03, 2006, 10:02:50 am »
Quote
Where are your files stored? on a fat partition?

maybe this partition should be remounted with iocharset=utf8?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109354\"][{POST_SNAPBACK}][/a][/div]

I did so...

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Gtk+ Utf-8/chinese Problem?
« Reply #12 on: January 03, 2006, 05:52:16 pm »
Quote
I think GTK2 applications work find with utf-8 encoding & truetype font.
So is there any GTK2 based mp3 player for Z?

i just can find one, but not yet port to Z...
http://bmpx.beep-media-player.org
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109352\"][{POST_SNAPBACK}][/a][/div]

It may not be possible to port it to pdaX for now, as it has very high requirement such as kernel > 2.6 and GTK+ > 2.8

That's why I have to compiled quite a number of GTK2 apps for my own use.  

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

eddiectc

  • Newbie
  • *
  • Posts: 46
    • View Profile
Gtk+ Utf-8/chinese Problem?
« Reply #13 on: January 04, 2006, 01:28:13 am »
Quote
It may not be possible to port it to pdaX for now, as it has very high requirement such as kernel > 2.6 and GTK+ > 2.8

That's why I have to compiled quite a number of GTK2 apps for my own use.   
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109434\"][{POST_SNAPBACK}][/a][/div]

um...so it seems impossible to make gtk work with utf-8 encoding...

I'm now finding gtk2 or qt based mp3 player for Z, any suggestion?

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Gtk+ Utf-8/chinese Problem?
« Reply #14 on: January 10, 2006, 07:45:41 am »
I tried to compile beep-media-player (Gtk2 XMMS like player).

However, it don't use integer based decoder (MAD and tremor to decode MP3 and OGG).

There are plugin for XMMS to use MAD and termor. However, I can't find one. After googling, it seems that there are MAD plugin for beep-media-player but I can't find the project website and the source code. Anyone know how to get it?  Thanks.