LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-24-2011, 06:48 AM   #1
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Rep: Reputation: Disabled
Confusion with locales: keep english command output


In chapter 7.8 of LFS 6.8 I would like to set the Swiss German charmap, so I use
de_CH.ISO-8859-1
(according to the explanations there).
But this also changes the text output of some commands to German (and results in some characters like äöü not being displayed correctly).
How can I have the CH charmap while keeping the text output in English?
 
Old 06-24-2011, 09:59 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You probably used: export LANG=de_CH.ISO-8859-1 which sets all LC_* types to de_CH.ISO-8859-1 (execute locale in a terminal to see this yourself.

To my knowledge LC_MESSAGES is used for command output. You can set this one separately to some other value (POSIX should be fine).

The /etc/profile entry mentioned in chapter 7.8 would then look like this (order is important):
Code:
export LANG=de_CH.ISO-8859-1
export LC_MESSAGES=POSIX
Hope this helps.
 
1 members found this post helpful.
Old 06-28-2011, 01:11 PM   #3
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
That's it.
Thanks!
 
Old 06-28-2011, 01:42 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome
 
  


Reply

Tags
lang, lc_messages, lfs, locale



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
Three preferred locales and Two defective locales guanx Slackware 1 05-20-2010 01:11 AM
confusion regarding a command rajaneesh Linux - Networking 2 01-01-2010 12:54 AM
How to redirect the output of exec command output in perl? sudhap85 Linux - Newbie 3 08-28-2009 03:35 PM
Confusion about Output redirction nikhil_rs_maheshwari Linux - General 4 03-15-2007 04:56 AM
Translating output of MySQL -> English benrose111488 Programming 1 02-23-2005 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration