Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115720 - "Using UTF-8" and missing /etc/env.d/02locale
Summary: "Using UTF-8" and missing /etc/env.d/02locale
Status: VERIFIED INVALID
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Docs Team
URL: http://www.gentoo.org/doc/en/utf-8.xml
Whiteboard:
Keywords:
Depends on: 351363
Blocks:
  Show dependency tree
 
Reported: 2005-12-15 17:29 UTC by Chris Stankevitz
Modified: 2011-01-14 08:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Stankevitz 2005-12-15 17:29:35 UTC
The document "Using UTF-8 with Gentoo" implies that I should alter the file
/etc/env.d/02locale but does not tell me what to do if that file does not exist.
Comment 1 Andreas Arens 2005-12-16 00:30:09 UTC
Doing the obvious, like "create it?"

So did I, and it worked as expected ever after.

Actual contents:
LC_ALL="en_US.UTF-8"
Comment 2 Chris Stankevitz 2005-12-16 02:12:58 UTC
Do I need to create a conf.d version of it?
Comment 3 Alin Dobre (RETIRED) gentoo-dev 2005-12-16 02:42:55 UTC
any editor creates a new file, if the requested one does not exist.

Noone said to create a file in /etc/conf.d/, only in /etc/env.d/.

Maybe the code from the document should be changed (I cannot change it right
now, I'm away from my home computer) with something like:
echo 'LC_ALL="en_GB.UTF-8"' >> /etc/env.d/02locale
Comment 4 Chris Stankevitz 2005-12-16 03:29:25 UTC
No one said to create a file in /etc/env.d
No one said to create a file in /etc/conf.d

Thanks for your help, it's working now.
Comment 5 Jan Kundrát (RETIRED) gentoo-dev 2005-12-16 08:48:38 UTC
(In reply to comment #4)  
> No one said to create a file in /etc/env.d  
  
From http://www.gentoo.org/doc/en/utf-8.xml#doc_chap2_sect2:  
  
"Setting the locale globally should be done using /etc/env.d/02locale. The file  
should look something like the following:"  
Comment 6 Roger 2010-01-23 02:10:16 UTC
I second the bug creator's perception.

I've read and reread all the published docs mentioning /etc/env.d/02locale file, and they all mislead the reader to the fact the file should already exist.

Until I performed a specific search for "/etc/env.d/02locale" and found this bug, did I realize I should have created this file on all my systems.

Usually, when configuring a system, the targeted configuration file for editing is already in place as a template/default.

The only time a config file might not exist is within $HOME.

This change to the documentation should be trivial to fix.  I'm guessing somebody lost the password. ;-)
Comment 7 Roger 2010-01-23 05:30:48 UTC
But on the flip side, from what I see it's *best* to leave the system in POSIX (or C) locale and have the user define his/her own locale within their shell config file (ie. $HOME/.bashrc) ... which is what I'm doing to stay with the Unix spirit. ;-)

If this is correct, the article hints at this, but might not put enough emphasis as it being "default" for most systems??  Just an idea for article clarification.
Comment 8 Ian Goodacre 2010-06-03 20:21:53 UTC
I agree that this is a bug and should be fixed. I read several of the documents and had the clear impression that the /etc/env.d/02locale file should exist.

I thought about creating the file, but first wanted to ensure that this missing file wasn't merely the tip of a missing iceberg. Trying to find out what package (please excuse my language, I am new to gentoo/emerge) provides this file, what else it provides and how to install it properly so I can carry on setting my locale. While searching for the proper source of the missing file I came across this bug.

The documentation could easily be made clearer, avoiding uncertainty for new users. I suggest adding something like "If the file does not exist, just create it with the above content." in the Setting the default system locale in /etc/env.d/02locale section of http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap3_sect3.