Author Topic: Displaying Japanese Or Any Other Unicode Character  (Read 11669 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« on: November 21, 2005, 09:37:24 am »
Hi:

Has anyone been successful in displaying any unicode text in the terminal, i.e. rxvt or so?

I've fiddled with it for the past couple of days, can't do it somehow.

I can change the font that rxvt uses to display stuff by for instance:
Code: [Select]
rxvt -fn "xft:Sazanami Gothic-16"and rxvt comes up using this font, but then when doing cat on a UTF-8 file it displays garbage.

Can anyone do it, not necessarily Japanese, any unicode characters will do, because the process is the same.

How can I do this?
« Last Edit: November 30, 2005, 05:17:55 pm by ShiroiKuma »
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ashikase

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #1 on: November 21, 2005, 08:10:48 pm »
Quote
Has anyone been successful in displaying any unicode text in the terminal, i.e. rxvt or so?
You might try using rxvt-unicode (a.k.a. urxvt); I've recently started using it on my notebook. One of it's key points (besides supporting unicode) is that it is very flexible with fonts - it even allows simultaneous usage of true/freetype fonts with X11 fonts.

I haven't tried it on the zaurus, as I don't use pdaXrom, but I saw a report from someone stating that it worked with OZ, so it shouldn't be difficult to build.

The source is available at: http://software.schmorp.de/#rxvt-unicode

- ashikase
- anpachi, gifu, japan
SL-C3100 & SL-C760

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« Reply #2 on: November 22, 2005, 02:50:19 am »
Quote
Quote
Has anyone been successful in displaying any unicode text in the terminal, i.e. rxvt or so?
You might try using rxvt-unicode (a.k.a. urxvt); I've recently started using it on my notebook. One of it's key points (besides supporting unicode) is that it is very flexible with fonts - it even allows simultaneous usage of true/freetype fonts with X11 fonts.

I haven't tried it on the zaurus, as I don't use pdaXrom, but I saw a report from someone stating that it worked with OZ, so it shouldn't be difficult to build.

The source is available at: http://software.schmorp.de/#rxvt-unicode

- ashikase
- anpachi, gifu, japan
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
I am using rxvt-unicode. And I can change the font the console uses for display to a UTF-8 font. But then it still displays garbage...

It might be something to do with locales, I installed the UTF-8 locale originally for XQt from [a href=\"http://xqt.sourceforge.jp/feed-testing/]http://xqt.sourceforge.jp/feed-testing/[/url] and all other programs work in Japanese, so I'm assuming it works.

But maybe there is some tweaking for the rxvt to be done. But can't get it to work...
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« Reply #3 on: November 25, 2005, 09:23:04 am »
I found a solution for this issue, so if anyone is interested:

1. Install vte_0.11.10_armv5tel.ipk.
2. Install gtkterm2_0.2.3_armv5tel.ipk

Then if you have Japanese locale installed and configured you'll see text in Japanese in gtkterm2 no problem.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #4 on: November 26, 2005, 05:08:29 am »
Hi, can you input CJK? I got "Error (Invalid or incomplete multibyte or wide character) converting data for child, dropping" when I input Chinese character. How can you set the font of gtkterm2? It is too small for me.

Moreover, do you know how to get the Chinese locale? I see Chinese filenames as "boxes".  Thanks.

Quote
I found a solution for this issue, so if anyone is interested:

1. Install vte_0.11.10_armv5tel.ipk.
2. Install gtkterm2_0.2.3_armv5tel.ipk

Then if you have Japanese locale installed and configured you'll see text in Japanese in gtkterm2 no problem.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104947\"][{POST_SNAPBACK}][/a][/div]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« Reply #5 on: November 26, 2005, 06:07:47 am »
Quote
Hi, can you input CJK? I got "Error (Invalid or incomplete multibyte or wide character) converting data for child, dropping" when I input Chinese character. How can you set the font of gtkterm2? It is too small for me.
Edit ~/gtkterm2rc.
Change the line starting with terminalFont to
Code: [Select]
terminalFont=Terminal 16
Quote
Moreover, do you know how to get the Chinese locale? I see Chinese filenames as "boxes".  Thanks.
Don't know about Chinese locale. You can install Japanese locale from the xqt.sourceforge.jp/feed-testing/

It works for pdaXrom, but for Chinese don't know.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #6 on: November 26, 2005, 08:21:54 am »
Thanks for the tips and packages!!
Actually I've also been looking for the Chinese solution for quite a long time.  It will surely be a big news for the Chinese language users.  
... Just so eager to use the console for most of the actions, commands, notepad, outliner, web browser, ebook reader, etc)  
« Last Edit: November 26, 2005, 08:22:55 am by ZDevil »

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]

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #7 on: November 26, 2005, 05:15:36 pm »
Thanks ShiroiKuma! The font size works for me.

I found that we need to install any UTF-8 locale and set the LANG environment variable to that to ready CJK filenames. For example, if you installed locale zh_TW.utf8, you need to set LANG to zh_TW.UTF-8. The side effect is all applications to display Chinese menu, etc.

If you want to be able to read CJK only and leaving all other things English. Try en_US.utf8 locale and LANG=en_US.UTF-8.

I attached the locale data ipks for you.

[ Invalid Attachment ]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« Reply #8 on: November 26, 2005, 05:26:11 pm »
Quote
If you want to be able to read CJK only and leaving all other things English. Try en_US.utf8 locale and LANG=en_US.UTF-8.

I attached the locale data ipks for you.

 [ Invalid Attachment ]  [ Invalid Attachment ]
[div align=\"right\"][a href=\"index.php?act=findpost&pid=105062\"][{POST_SNAPBACK}][/a][/div]
Great, thanks for these. We've made some progress here  
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #9 on: November 26, 2005, 06:27:28 pm »
My heartfelt thanks for your packages, cs_jacky!  Have been waiting for this for ages.  

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]

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #10 on: November 27, 2005, 01:14:21 am »
I compiled gnome-terminal. The gnome-terminal is more user friendly and more option (such as backgrounds). However, it requires more libraries and slower (compare with gtkterm2).

EDIT: ipk updated. Please download it from later post.
« Last Edit: November 27, 2005, 05:36:16 pm by cs_jacky »

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Displaying Japanese Or Any Other Unicode Character
« Reply #11 on: November 27, 2005, 06:35:46 am »
Quote
I compiled gnome-terminal. The gnome-terminal is more user friendly and more option (such as backgrounds). However, it requires more libraries and slower (compare with gtkterm2).

 [ Invalid Attachment ]
[div align=\"right\"][a href=\"index.php?act=findpost&pid=105086\"][{POST_SNAPBACK}][/a][/div]
Can you open more than one session in gnome-terminal? How do you specify which font it uses for display?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #12 on: November 27, 2005, 07:33:48 am »
Thanks again, cs_jacky.  I wonder if it's also possible to use big5 locale as well?  

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]

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #13 on: November 27, 2005, 04:16:44 pm »
Yes, you can open new windows or new tabs. You can specify font by edit current profile.

Quote
Quote
I compiled gnome-terminal. The gnome-terminal is more user friendly and more option (such as backgrounds). However, it requires more libraries and slower (compare with gtkterm2).

 [ Invalid Attachment ]
[div align=\"right\"][a href=\"index.php?act=findpost&pid=105086\"][{POST_SNAPBACK}][/a][/div]
Can you open more than one session in gnome-terminal? How do you specify which font it uses for display?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=105099\"][{POST_SNAPBACK}][/a][/div]

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Displaying Japanese Or Any Other Unicode Character
« Reply #14 on: November 27, 2005, 05:35:18 pm »
I updated gnome-terminal ipk. The changes are as follows:

1. schema are installed. You have Default profile and shortcut key.
2. schema files are installed to /etc/...

If you have changed gnome-terminal profile, you need to delete gnome-terminal directories (there are 2) under ~/.gconf.

 [ Invalid Attachment ]

P.S. You need to install vte as well.
« Last Edit: January 04, 2006, 04:29:37 am by cs_jacky »