You are not logged in.

#1 2024-08-21 15:01:02

tethys
Member
Registered: 2019-08-13
Posts: 121

[SOLVED] Asian characters display in gnome-terminal

How can I correctly display asian characters in gnome-terminal when I use "trans" for translations?

trans :hi+zh+ja+bn "word"

The characters in those languages are not displayed correctly.

Edit: I played around and pasted some chinese characters from Firefox in gnome-terminal to see if they are shown correctly and they were. After that the "trans" command above also started working!

Last edited by tethys (2024-08-21 20:03:28)

Offline

#2 2024-08-21 15:27:21

seth
Member
Registered: 2012-09-03
Posts: 60,792

Re: [SOLVED] Asian characters display in gnome-terminal

Please post a screenshot of what you see and concern - your post kinda looks chinese to me…

Offline

#3 2024-08-21 16:28:03

tethys
Member
Registered: 2019-08-13
Posts: 121

Re: [SOLVED] Asian characters display in gnome-terminal

How do I display correctly chinese, japanese, hindi, and bengali characters in gnome-terminal?

When I give in gnome-terminal:

trans :hi "word"

this is what I see!

However, when I paste the text from the terminal in firefox I get the correct characters!

Last edited by tethys (2024-08-21 16:59:02)

Offline

#4 2024-08-21 16:32:31

seth
Member
Registered: 2012-09-03
Posts: 60,792

Re: [SOLVED] Asian characters display in gnome-terminal

file:///test.png

This isn't how the internet works, https://imgur.com/upload

Always post text and an image of what you see (good and bad) - the text you post appears for everyone alse according to *their* local font configuration, so we have no reference for what you see or expect to see unless you post screenshots of the rendering on your system.

Offline

#5 2024-08-21 17:12:20

tethys
Member
Registered: 2019-08-13
Posts: 121

Re: [SOLVED] Asian characters display in gnome-terminal

OK, edited previous post.

I have following fonts installed:

ttf-baekmuk
ttf-dejavu
ttf-hannom
ttf-indic-otf
ttf-liberation

I manage to see the right characters in firefox for example, however the gnome-terminal with the "trans" command as explained in the first post does not work!

Last edited by tethys (2024-08-21 19:49:34)

Offline

#6 2024-08-21 21:56:43

seth
Member
Registered: 2012-09-03
Posts: 60,792

Re: [SOLVED] Asian characters display in gnome-terminal

Fwwi, from the screenshot you were lacking font coverage (pango then just paints the UTF8 code in a box)
Eg.

fc-list :charset=0939

will list all fonts that currently provide ह - if you installed those only after starting the terminal (iirc gnome-terminal runs a daemon, ie. new windows don't create a new process), it will have only picked up  those fonts after a restart.

Offline

#7 2024-08-22 06:16:49

tethys
Member
Registered: 2019-08-13
Posts: 121

Re: [SOLVED] Asian characters display in gnome-terminal

Thank you for the reply. I indeed did not restart, just refreshed the cache with fc-cache!

Offline

Board footer

Powered by FluxBB