1 |
On 20/02/2012 00:11, William Hubbs wrote: |
2 |
> On Sun, Feb 19, 2012 at 11:56:40PM +0800, Ben wrote: |
3 |
>> On 19 February 2012 23:14, Ulrich Mueller<ulm@g.o> wrote: |
4 |
>>>>>>>> On Sun, 19 Feb 2012, Ben wrote: |
5 |
>>> |
6 |
>>>> In my opinion we should set a default environment with the following |
7 |
>>>> values: |
8 |
>>> |
9 |
>>>> LANG=en_US.UTF-8 |
10 |
>>>> LC_ALL= |
11 |
>>>> LC_COLLATE=C |
12 |
>>> |
13 |
>>>> This offers the best default options to the majority of users, and |
14 |
>>>> is easy to customize for those who wish to use another locale. |
15 |
>>> |
16 |
>>> At least, LC_NUMERIC=C should be added to this, otherwise numbers will |
17 |
>>> be formatted with commas as thousands separators. |
18 |
>>> |
19 |
>>> Also en_US.UTF-8 for LC_MEASUREMENT and LC_PAPER means imperial units |
20 |
>>> and letter paper, which isn't optimal for users outside of the U.S. |
21 |
>>> |
22 |
>>> Ulrich |
23 |
>>> |
24 |
>> |
25 |
>> I think those users (and that includes myself) should then set LANG to |
26 |
>> something more appropriate to their use case. |
27 |
> |
28 |
> According to our localization guide, there is a safe default that forces |
29 |
> UTF-8 characters but doesn't force any language. I have the following |
30 |
> single line in /etc/env.d/02locale: |
31 |
> |
32 |
> LC_CTYPE=en_US.UTF-8 |
33 |
> |
34 |
|
35 |
That looks good but perhaps it should also define LANG=POSIX, which is |
36 |
similar to Ulrich's proposal. Something like: |
37 |
|
38 |
# To configure for your region, set LANG to an appropriate locale, then |
39 |
comment |
40 |
# or remove LC_CTYPE. Run "locale -a" to obtain a list of available locales. |
41 |
LANG=POSIX |
42 |
LC_CTYPE=en_US.utf8 |
43 |
|
44 |
I know that adding LANG=POSIX doesn't do anything in this case but I |
45 |
have a feeling that its presence would be instructive to new users. If a |
46 |
user is asked to configure something which isn't present, it often |
47 |
generates questions which might otherwise be avoided. I've changed |
48 |
"en_US.UTF-8" to "en_US.utf8" there for similar reasons. |
49 |
|
50 |
Not to mention that, if one is curious and searches for "posix locale" |
51 |
via Google, the first link is for the Open Group specification :) |
52 |
|
53 |
I reckon that this, along with some basic information in the handbook, |
54 |
would be a step in the right direction. |
55 |
|
56 |
--Kerin |