Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Xterm - Show japanese characters
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Fri Feb 02, 2018 2:54 pm    Post subject: [Solved]Xterm - Show japanese characters Reply with quote

Hello, i dont know if it's good topic for post this question, but , how is it possible to show japaneses characters on xterm ?
Because i have many files with japanese characters name, and when i do ls command, xterm show many "???"


Last edited by Fulgurance on Sat Feb 03, 2018 10:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 998
Location: Frankfurt, Germany

PostPosted: Fri Feb 02, 2018 5:34 pm    Post subject: Reply with quote

Hi Fulgurance,

this could be:
1) a problem with your locale settings
2) a problem with the font you selected for xterm
3) the use flags you selected for compiling xterm

Please show us the output of:
Code:
export | egrep "(LANG|LC_)"
eix x11-terms/xterm

Which font do you use for xterm?

Mike
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Fri Feb 02, 2018 11:56 pm    Post subject: Reply with quote

Thanks for your help :)

Code:
fulgurance@msi-gs73vr-6rf ~ $ export | egrep "(LANG|LC_)"
declare -x LANG="fr_FR.utf8"
fulgurance@msi-gs73vr-6rf ~ $ eix x11-terms/xterm
[I] x11-terms/xterm
     Available versions:  327 ~330 ~331 {Xaw3d +openpty toolbar truetype unicode xinerama}
     Installed versions:  327(15:45:17 02/02/2018)(openpty truetype unicode -Xaw3d -toolbar -xinerama)
     Homepage:            https://invisible-island.net/xterm/
     Description:         Terminal Emulator for X Windows


My .Xresources:
Code:
xterm*background: black
xterm*foreground: white
xterm*savelines: -1
xterm*cursorBlink: true
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 998
Location: Frankfurt, Germany

PostPosted: Sat Feb 03, 2018 1:15 pm    Post subject: Reply with quote

Locale settings and USE flags seem to be OK. :-)

1) Is package 'media-fonts/font-misc-misc' installed? If not: install it and retry. Does xterm now show Japanese characters?

2) If you are looking for Truetype fonts: Look at the output of
Code:
fc-list ':lang=ja'

It seems that xterm is able to display Japanese characters, if one of those fonts is selected. You could install 'media-fonts/droid' and start xterm with 'xterm -fa "DroidSansFallback" -fs 10'. Fonts look ugly, but it should show Japanese characters.

3) Xterm seems to be a bit tricky. I usually use konsole (I really love this terminal program) with font "Source Code Pro". It displays Western, Japanese and Chinese characters without problems. But if I start xterm with font 'Source Code Pro' ('xterm -fa "Source Code Pro" -fs 10'), xterm does NOT display Japanese characters. Strange.
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 266
Location: Brisbane, Australia

PostPosted: Sat Feb 03, 2018 3:42 pm    Post subject: Re: Xterm - Show japanese characters Reply with quote

Fulgurance wrote:
Hello, i dont know if it's good topic for post this question, but , how is it possible to show japaneses characters on xterm ?
Because i have many files with japanese characters name, and when i do ls command, xterm show many "???"


I use Xfce, xfce4-terminal with app-i18n/ibus-anthy, app-i18n/ibus and these fonts installed:
media-fonts/corefonts
media-fonts/droid
media-fonts/font-adobe-100dpi
media-fonts/font-adobe-75dpi
media-fonts/font-adobe-utopia-100dpi
media-fonts/font-adobe-utopia-75dpi
media-fonts/font-adobe-utopia-type1
media-fonts/font-jis-misc
media-fonts/font-sony-misc
media-fonts/intlfonts
media-fonts/ipamonafont
media-fonts/ja-ipafonts
media-fonts/kochi-substitute
media-fonts/mikachan-font-otf
media-fonts/mikachan-font-ttc
media-fonts/mikachan-font-ttf
media-fonts/sazanami

Don't know which font is used by xfce4-terminal to display Japanese characters.

My /etc/localgen:
en_AU ISO-8859-1
en_AU.UTF-8 UTF-8

No ja_JP....

With Xfce there is a small icon on the taskbar to switcg between EN and JA.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6276

PostPosted: Sat Feb 03, 2018 5:34 pm    Post subject: Re: Xterm - Show japanese characters Reply with quote

Fulgurance wrote:
ls command, xterm show many "???"

Code:
export LC_CTYPE="fr_FR.utf8"
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Sat Feb 03, 2018 6:13 pm    Post subject: Reply with quote

What works for me is:

- set xterm utf8 to 1
- set xterm VT100 font to -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1
- set xterm VT100 wideFont to -Misc-Fixed-Medium-R-Normal-ja-18-120-100-100-C-180-ISO10646-1

I have zero recollection how I came up with these values or what fonts I might have installed (I have *everything* in media-fonts).

Set this up a decade or so ago and it still works :lol:
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Sat Feb 03, 2018 10:44 pm    Post subject: Reply with quote

I have installed all recommended japaneses fonts and set xterm options of frostschutz, but nothing :(

Strange, when i have downloading file with japanese name, my console show correctly japanese font, but when i see my mounted USB with FAT32 file system, all japaneses files don't show any japaneses characters ....

I think problem come with FAT32 file system ...

EDIT:
It's that ! When i do sudo mount -t vfat /dev/sdb1 /mnt -o rw,iocharset=utf8, it's work fine !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum