LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-01-2002, 07:55 AM   #1
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Switching language support at login


I run this script in my .bash_profile which looks like this:

Code:
echo -n "Which language?"
read LANGUAGE
case $LANGUAGE in 
    ja) export LANG=ja_JP.utf8
         export LC_ALL=ja_JP.utf8
         echo "Language set to Japanese"
          ;;
    en) export LANG=en_GB.UTF-8
          export LC_ALL=en_GB.UTF-8
          export "Language set to English"
          ;;
      *) echo "Using default English"
          ;;
esac
It worked great until I upgraded to Redhat 8.0. Somehow, when X starts up, it changes the LANG variable back to the default en_GB.UTF-8.



The strange thing is that the export command on the tty gives the LANG variable as set to ja (as it should be) and in X it gives the variable as gb (can a variable have two values at the same time? - Has Schroedinger lost his cat again??!)

Any ideas?

Bert
 
Old 11-01-2002, 08:37 AM   #2
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Original Poster
Rep: Reputation: 46
Solved it.

The problem is that X doesn't support ja_JP.utf8, only ja_JP.eucJP so that when X boots up, it can't find the charmap for japanese UTF8 and drops back to the default which is GB UTF8.

So this works:

Code:
echo -n "Which language?"
read LANGUAGE
case $LANGUAGE in 
    ja) export LANG=ja_JP.eucJP
         export LC_ALL=ja_JP.eucJP
         echo "Language set to Japanese"
          ;;
    en) export LANG=en_GB.UTF-8
          export LC_ALL=en_GB.UTF-8
          export "Language set to English"
          ;;
      *) echo "Using default English"
          ;;
esac
I found this out by looking at the /etc/sysconfig/redhat-config-language/language.py script which shows the possible options and yep, ja utf8 is not one of them. My other proprietary OS uses UTF8 which supports half-width japanese characters - actually a much better charset to use but it's a cross we'll have to bear.

I can change the language at the login prompt again now.

Schroedingers cat is dead. I killed it.

Bert
 
Old 05-02-2003, 04:05 PM   #3
hartings
LQ Newbie
 
Registered: Apr 2002
Location: SWEDEN
Distribution: RedHat 9
Posts: 25

Rep: Reputation: 15
Exclamation utf8 and a compatible linux-windows network

Bert,

You seem to be the man to solve my problem! May I explain it to you? It has everything to do with utf8:

I have Mandrake 9.0 on my local server and 9.1 on another machine (earlier 9.0: worked great!) and I have a couple of Win machines connected to this network.
Installing 9.1 on the machine gave me couple of problems related to the default charset utf8 used in 9.1 (iocharset=iso8859-1, codepage=850 is used in 9.0 per default due to my swedish keybord and language settings).

Some examples:

1. In the local network:
If I mount my windows partions on my 9.0 server with iocharset=iso8859-1, my windows clients in the network can see all files (meaning also the ones with swedish characters). BUT on my 9.1 machine I can not see the swedish filenames (inspite of a correctly configured samba - the windows clients are fine!)
If I mount my windows partitions on my 9.0 server with iocharset=utf8, I can see the swedish file names on my 9.1 machine. BUT the windows clients only see "strange characters"
How can I both get to work?
2. Acrobat reader 5.0.5 can not work with the default charset utf8!!and crashes upon start, nor can Kghostview show files with swedish chracters, allthough Konqueror can!

It seems that Mandrake (and Red Hat) has released a "non-international" release. I guess that other, non-std character users, will have similar problems (I got this confirmed the other day from a finnish and german user)

I tried to implement a proposed solution from a LimuxQuestions.org group for acroread:
[ralf@L750 ralf]$ alias acrobat='LANG=C /usr/local/Acrobat5/bin/acroread'
[ralf@L750 ralf]$ acrobat
Warning: charset "UTF-8" not supported, using "ISO8859-1".
Aborted
[ralf@L750 ralf]$

I have also tried to implement iocharset=iso8859-1 the /etc/fstab file on my 9.1 machine, without any success. I seem to be stuck with the strange utf8, which is not compatible with a combined linux-windows network nor some of mandrakes own applications (like Kghostview,...).

Is there anything in my /etc/sysconfig/i18n file that needs to be changed to get a windows-linux compatible network and to get to acroread (and others) working?:

[ralf@L750 ralf]$ cat /etc/sysconfig/i18n
LC_TELEPHONE=sv_SE.UTF-8
LC_CTYPE=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LC_MONETARY=sv_SE.UTF-8
LC_ADDRESS=sv_SE.UTF-8
LC_COLLATE=en_US.UTF-8
LC_NAME=sv_SE.UTF-8
LC_PAPER=sv_SE.UTF-8
LC_NUMERIC=sv_SE.UTF-8
SYSFONT=lat0-16
LC_TIME=en_US.UTF-8
LC_MEASUREMENT=sv_SE.UTF-8
LANG=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_IDENTIFICATION=sv_SE.UTF-8
[ralf@L750 ralf]$

I hope there is a solution for this. I have understand that there are A LOT of internatonal character user which have similar problems. If there is a solution, could this be "announced" somewhere?

Thanks for any help I (and all other international character users ) can get :-)

Ralf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
all language support in X apikoros Linux - Software 0 11-22-2005 02:45 AM
Switching input keyboard language in Linux fabianrios Linux - Software 3 09-15-2005 04:46 PM
Mozilla 1.7.3 - switching between language packs njschroe Linux - Software 0 02-02-2005 05:33 PM
language switching in KDE (RH9) -- heeelp! LooseCanon Red Hat 2 09-22-2003 02:16 PM
language support UNIX Linux - Newbie 1 12-07-2002 06:32 AM


All times are GMT -5. The time now is 10:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration