LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   display chinese character in a termial (https://www.linuxquestions.org/questions/linux-newbie-8/display-chinese-character-in-a-termial-4175455590/)

tmortred 03-25-2013 09:27 PM

display chinese character in a termial
 
Hello everyone ! I am new to debian .I have install debian yesterday .but now i do not how to display chinese character in a termial .nor do i can view pdf document in a termial .
if i can solve this two questions ,It can be a good benefits to me !
can anyone give me some tips

shivaa 03-25-2013 11:30 PM

Well, simply you can't! A terminal cannot display two languages or two different font type at a time.

Also a terminal accepts only 'monospace' fonts, so you have an option to download chinese font that is hinted in 'monospace' style. Copy it in /usr/share/fonts/truetype directory and then change font setting in terminal and choose your chinese mono font instead of default mono sans font.

tmortred 03-26-2013 09:17 AM

yes ,thank you ! now I am try my best to change font setting in a termial !

David the H. 03-26-2013 05:00 PM

Modern linux and modern consoles like bash are generally UTF-8 compliant, which means they are capable of displaying any language (I have no problem with Japanese in mine). You just have to make sure that the text being displayed is also in UTF-8 format, and that the font you're using also supports the language (most unicode fonts will support most major languages).

If your text files use another encoding, you can usually use iconv to convert them. And for filenames, there's convmv. Also check the mount settings for your storage devices for character conversion settings.

Text entry of CJK languages generally just requires an IME framework, like iBus or SCIM, and the appropriate backend. These generally only work in the gui environment though, so you may have a hard time manipulating files with non-western names if you ever have to use a non-gui terminal.

Randicus Draco Albus 03-26-2013 05:30 PM

There is also a package called mlterm (multi-lingual terminal) that can be useful. As David the H. already stated, it also requires IBus (my preferred) or SCIM to input characters.

tmortred 03-28-2013 08:17 PM

[QUOTE=David the H.;4919478]Modern linux and modern consoles like bash are generally UTF-8 compliant, which means they are capable of displaying any language (I have no problem with Japanese in mine). You just have to make sure that the text being displayed is also in UTF-8 format, and that the font you're using also supports the language (most unicode fonts will support most major languages).

Thank for your help ! In fact , when I execute the command dpkg-reconfigure locales ,set the default LANG=en_US.UTF-8 . the Xterm can display the chinese character ,but in termial (that means I have just login the tty ) it display the square instead of chinese . also ,I have tried to set LANG=ZH_CN.UTF-8. then when I execute dpkg-reconfigure locales ,the termial display many squares .


All times are GMT -5. The time now is 08:18 AM.