1 |
On 31 July 2012 05:33, Michael Orlitzky <michael@××××××××.com> wrote: |
2 |
> On 07/30/12 12:28, Michał Górny wrote: |
3 |
>> |
4 |
>> My point here is that you want the thing to change. So you first try to |
5 |
>> convince people here to change. We practically did a small survey here |
6 |
>> and in the result we didn't agree on doing the change. |
7 |
>> |
8 |
>> So you're saying we should do another survey on another group, hoping |
9 |
>> that this time the result will be on your side. |
10 |
> |
11 |
> We didn't do a survey, we asked, |
12 |
> |
13 |
> "Is there a reason for not using at least en_US.UTF-8 as a "sane" |
14 |
> default value?" |
15 |
> |
16 |
> Unsurprisingly, the responses contained reasons for not using |
17 |
> en_US.UTF-8 as the default. |
18 |
> |
19 |
|
20 |
I think its a shame that : |
21 |
|
22 |
1. the current handbook way to change timezone is manually editing a file. |
23 |
2. the handbook doesn't mention `eselect locale` |
24 |
3. `eselect locale list` is useless if you have *all* locales available to you. |
25 |
4. `eselect locale` can only set the LANG variable. |
26 |
5. that eselect doesn't have an interactive mode yet. |
27 |
|
28 |
Why? because this problem could be made simpler by providing a way to |
29 |
use a recommended locale for your timezone, which is likely to yield a |
30 |
more sane default for that timezone. |
31 |
|
32 |
It would also make it easier to validate the value the user chooses |
33 |
for their Timezone value. |
34 |
|
35 |
Consider: |
36 |
|
37 |
eselect timezone list |
38 |
# all level 1 timezones + groups , ie: like ls /usr/share/zoneinfo |
39 |
eselect timezone list America/ |
40 |
# contents of /usr/share/zoneinfo/America |
41 |
eselect timezone set America/Chicago |
42 |
# /etc/timezone is updated to 'America/Chicago' |
43 |
# /etc/localtime is replaced with /usr/share/zoneinfo/America/Chicago |
44 |
eselect locale set --all auto |
45 |
# LANG and LC_* are set using the values defined as "default" for |
46 |
America/Chicago |
47 |
eselect locale set --ctype auto |
48 |
# Only LC_CTYPE is autopopulated. |
49 |
eselect locale list |
50 |
# 600 items because you have a vanilla locale.defs |
51 |
eselect locale list --timezone |
52 |
# shows a list of LOCALE values for the current TZ, with the one that |
53 |
would be used as default first/marked up differently |
54 |
eselect locale list en |
55 |
# shows english locale options |
56 |
eselect locale set --ctype en_US.utf8 |
57 |
|
58 |
|
59 |
The benefits of setting these locales this way are obvious to me at |
60 |
least, you can set locales to a value that is sensible automatically. |
61 |
You also can validate a users choice of locale and provide feedback, |
62 |
such as, you can list non-installed locales, and then tell the user if |
63 |
thy try to use a locale that isn't installed yet they need to update |
64 |
locales.def |
65 |
|
66 |
The only way I can suggest something better, would be an interactive |
67 |
locale setter, something like 'tzselect' , except sets timezone *and* |
68 |
locale information, with the ability to automatically update |
69 |
locales.def and add new locale definitions and regenerate the locale |
70 |
database. |
71 |
|
72 |
This way, you could have a selection process more like this: |
73 |
|
74 |
https://gist.github.com/3240866 |
75 |
|
76 |
#? 1 |
77 |
|
78 |
The following information has been given: |
79 |
|
80 |
United States |
81 |
Eastern Time |
82 |
|
83 |
Therefore TZ='America/New_York' will be used. |
84 |
Local time is now: Thu Aug 2 17:33:17 EDT 2012. |
85 |
Universal Time is now: Thu Aug 2 21:33:17 UTC 2012. |
86 |
Is the above information OK? |
87 |
1) Yes |
88 |
2) No |
89 |
#? 1 |
90 |
Your Current locale settings are: |
91 |
|
92 |
LANG="POSIX" |
93 |
|
94 |
The recommended settings for your locale are : |
95 |
LANG="en_US.utf8" |
96 |
LC_CTYPE="en_US.utf8" |
97 |
|
98 |
Do you wish to change your locale settings at this time? |
99 |
1) No |
100 |
2) Yes - Use recommended settings |
101 |
3) Yes - Configure locale interactively. |
102 |
|
103 |
At least this way, the effort required to configure your system into a |
104 |
very good logical UTF8 default is trivial. |
105 |
|
106 |
-- |
107 |
Kent |
108 |
|
109 |
perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, |
110 |
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );" |
111 |
|
112 |
http://kent-fredric.fox.geek.nz |