LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Does Linux standard terminal support other charsets other than English? (https://www.linuxquestions.org/questions/linux-software-2/does-linux-standard-terminal-support-other-charsets-other-than-english-125417/)

George2 12-13-2003 12:25 AM

Does Linux standard terminal support other charsets other than English?
 
Hello, everyone!


Does Linux standard terminal support other charsets other than English? I am using Red Hat 7.3. I have downloaded a plain text file which is encoded with GBK charset. And I use the command "more <file name>". then Linux said it is a binary file and only displays the hex value of each double-byte character. Surely I have setup the locale environment variable of the current user.

So, I want to know whether Linux standard terminal support other charset except standard English charset? Is it possible to read other charset except standard English charset in Linux standard terminal?


Thanks in advance,
Geo

George2 12-13-2003 06:21 AM

Can anyone help?


Geo

pablob 12-13-2003 06:37 AM

sorry, Geo, I can't find the difference between this problem and the other one you had.

George2 12-13-2003 06:47 AM

Hi, pablob buddy!


I think I have setup the locale correctly under your instructions. Then I want to verify whether my setup is correct. So I downloaded a GBK encoded file from a Windows machine and I use the command "more" to see the content of this file in Gnome terminal, but I failed to see the result and Linux said it is a binary file and only displays the hex value of each double-byte character.

I just want to verify the setup of locale.


Can you help? Do you have any good ideas?


regards,
Geo

pablob 12-13-2003 06:56 AM

well, the best test is to write a character included only on the pointed charset.
I.e:

In spanish there is a letter which is a 'n' with kind of a '-' on top of it.
I'll write this in case you can see it:

ñ

So, I know I've got a correct spanish locale install if I can write that letter (which does appear on my keyboard) on the konsole.

About your file.... I don't really know. Maybe it is a binary locale file; I mean, a file which is not encoded as GBK but a file which provides GBK support.

George2 12-13-2003 07:04 AM

Thanks, pablob buddy!


Do you mean the best way to verify is to type other than display?

If you write a spanish file using Windows notepad and transport it to Linux, then you use the "more" command to see the content of the file. Can you see the content correctly?


Best regards,
Geo

pablob 12-14-2003 06:44 AM

1.- I think so.
2.- At my work, I keep constantly opening text (xml) files written in windows with notepad by programmers, and working with them on linux & solaris with no problem to read them perfectly ok. The only problem (and I can ignore it, 95% of the times) is the "line-feed" character:

A line like this written on windows:

Forty six and two, try to help me

turns into this one when you read it on linux:

Forty six and two, try to help me^M

The difference is the end of line character "^M", which depending on what program is processing the file, becomes no problem at all. I mean, if you open it with OpenOffice or whatever, it will be smart enough to detect "hey, this file comes from windows, I'll take out the windows line feed and give it back to my linux user ok"
Or if it is an application server which will read the line, it will "think" the same and work ok.

George2 12-14-2003 08:01 AM

Thanks, pablob buddy!

I think from your reply other charset encoded characters can read with no trouble in Gnome ternimal (Red Hat 7.3) with the correctly setup of locale environment variables and no additional software or packages are needed. Am I correct?

I heard from other buddys that to display GBK charset, glibc must support GBK charset. How to see whether glibc supports a special charset, for example, GBK?


Best regards,
Geo

pablob 12-25-2003 06:27 AM

Well, for the first part, yes you are right.

For the glibc stuff... I think so, but not sure.


All times are GMT -5. The time now is 11:48 AM.