LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 10-01-2009, 05:18 PM   #1
Mogget
Member
 
Registered: Dec 2008
Location: Norway
Distribution: Debian
Posts: 43

Rep: Reputation: 15
programs not using correct locale in pure console.


Hello.

My console is working nicely but i'm having troubles getting programs like vim etc. to use the locale i have set up. What is happening is that when i type special characters like וזר it comes up as ? instead.
Anyone have an idea how to solve this?

I'm using a selfmade linux install ( Linuxfromscratch.org )

Edit: I edited the post because i forgot out something that might be important information

Output from locale:
Code:
locale
LANG=nb_NO.ISO-8859-1
LC_CTYPE="nb_NO.ISO-8859-1"
LC_NUMERIC="nb_NO.ISO-8859-1"
LC_TIME="nb_NO.ISO-8859-1"
LC_COLLATE="nb_NO.ISO-8859-1"
LC_MONETARY="nb_NO.ISO-8859-1"
LC_MESSAGES="nb_NO.ISO-8859-1"
LC_PAPER="nb_NO.ISO-8859-1"
LC_NAME="nb_NO.ISO-8859-1"
LC_ADDRESS="nb_NO.ISO-8859-1"
LC_TELEPHONE="nb_NO.ISO-8859-1"
LC_MEASUREMENT="nb_NO.ISO-8859-1"
LC_IDENTIFICATION="nb_NO.ISO-8859-1"
LC_ALL=
Output from locale -a: ( There was alot more but i deleted the ones that was not interesting for us )
Code:
locale -a
nb_NO
nb_NO.iso88591
nb_NO.utf8
Edit: I edited the post because i forgot out something that might be important information

Code:
cat /etc/sysconfig/console
KEYMAP="no-latin1"
FONT="lat1-16 -m ISO-8859-1"
Default locale:
Code:
cat /etc/default/locale 
LANG="nb_NO.ISO-8859-1"
profile:
Code:
cat /etc/profile 
export LANG=nb_NO.ISO-8859-1
inputrc
Code:
cat /etc/inputrc 
set meta-flag On
set input-meta On
set convert-meta Off
set output-meta On
Any help or suggestions to what could be causing this would be greatly appreciated. I will go to sleep now and hopefully someone can give me a pointer on how to solve this.

Last edited by Mogget; 10-02-2009 at 01:45 AM.
 
Old 10-01-2009, 11:10 PM   #2
Vhann
LQ Newbie
 
Registered: Nov 2008
Posts: 24

Rep: Reputation: Disabled
Try using a plain ascii charset (for example use 'en_US' rather than 'en_US.UTF8).

Regards,
Vhann
 
Old 10-01-2009, 11:27 PM   #3
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Glad I saw this post ... I am having the same issue ... especially with full screen dialog screens, or from certain commands. I was setting the locale through my /etc/profile. I'd like to know how you fix your issue. So, if you figure it out please post what you did to fix it ... thanks
 
Old 10-02-2009, 01:40 AM   #4
Mogget
Member
 
Registered: Dec 2008
Location: Norway
Distribution: Debian
Posts: 43

Original Poster
Rep: Reputation: 15
I tried setting both /etc/default/locale to LANG="nb_NO", /etc/profile to export LANG=nb_NO and then logged out and in again. The problem is still there unfortunately.

Code:
locale
LANG=nb_NO
LC_CTYPE="nb_NO"
LC_NUMERIC="nb_NO"
LC_TIME="nb_NO"
LC_COLLATE="nb_NO"
LC_MONETARY="nb_NO"
LC_MESSAGES="nb_NO"
LC_PAPER="nb_NO"
LC_NAME="nb_NO"
LC_ADDRESS="nb_NO"
LC_TELEPHONE="nb_NO"
LC_MEASUREMENT="nb_NO"
LC_IDENTIFICATION="nb_NO"
LC_ALL=
Could the problem be that programs in console doesnt support my locale and that i should try to use the UTF-8 locale instead? I am realy hesitant to use the UTF-8 locale as i read over and over on google that bad things happend when using it since programs havent gotten out all the quirks in how to work with it yet.
 
Old 10-02-2009, 01:48 AM   #5
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Quote:
Originally Posted by Mogget View Post
Could the problem be that programs in console doesnt support my locale and that i should try to use the UTF-8 locale instead? I am realy hesitant to use the UTF-8 locale as i read over and over on google that bad things happend when using it since programs havent gotten out all the quirks in how to work with it yet.
(CLFS pure64 build)

I can confirm the UTF-8 problem... This setting has caused dialog distortion and character distortion in the console... I am working on borrowing & implementing Gentoo's locale-gen tool. It sets the global locale's glibc.

It should work... and I'll share any scripts that I'll put together with instructions if I can get it to work...

BTW... Are you using the LFS bootscripts... or custom inits..? (e.g. BSD, OpenRC)
 
Old 10-02-2009, 03:14 PM   #6
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Thumbs up

First off I didn't mean in any way to try to hijack your thread... Just collaborate.

I was able to fix my Locale problem ... And now all fonts are printed correctly in console... I am using Debian's locale-gen.


Code:
# Based upon Debian's locale-gen
/usr/sbin/locale-gen

# locale-gen config file which contains my locale's settings, bypassing my /etc/profile
/etc/local.gen

# OpenRc 0.5.0 function.sh
/etc/init.d/function.sh

I had borrowed this idea from a Gentoo setup, I only browsed the code briefly, & since I had installed Roy Marple's OpenRc 0.5.0 onto my CLFS box, I felt that this should work nicely; since I notice in the code that locale-gen was pointing correctly to my /etc/init.d/function.sh ...

Now I no that most function.sh's are standard ( I think ), but they are usually in a separate directory dependent on which baselayout is used.

If you are interested in using this solution, I can upload the files and a readme to my mediafire account, so you can download, and view the source, and point to the correct function.sh or any other adjustment.

Now all of my locales are set correctly, and all dialog windows, and console output appear correctly.

Last edited by manwithaplan; 10-02-2009 at 03:15 PM.
 
  


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
Correct en_NZ locale, but date format is incorrect go_player Linux - Newbie 1 07-03-2009 05:09 PM
the display doesn't come back from stand-by in pure console jsmith6 Slackware 3 04-10-2009 02:28 PM
When running programs: Locale not supported by C library miceagol Linux - General 2 06-02-2006 04:46 PM
boot to pure console no x server daveman_t Linux - Newbie 5 12-23-2004 04:50 PM
mplayer in pure console (without X) septanla Linux - Software 2 10-20-2003 08:23 PM


All times are GMT -5. The time now is 11:01 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