Gentoo Archives: gentoo-user

From: "Sebastian Günther" <samson@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Kernel update messed up console encoding
Date: Fri, 27 Feb 2009 21:05:42
Message-Id: 20090227210537.GA10044@marvin.heimnetz.local
In Reply to: [gentoo-user] Kernel update messed up console encoding by "Florian v. Savigny"
1 * Florian v. Savigny (lorian@××××××××.de) [27.02.09 18:30]:
2 >
3 > Dear listmates,
4 >
5 > (I did try to use a more specific mailing list, and tried
6 > gentoo-admin, but it seems there's nobody around.)
7 >
8 > I recently updated my kernel from 2.6.17 to 2.6.27, and it seems that
9 > the new kernel causes the encoding of the console to behave weird:
10 >
11 > I used to use the default Unix encoding, i.e. iso-8859-1, because this
12 > was fine for German (now I want to stick to it because I have so much
13 > legacy material in that encoding). Now, when I type a string with
14 > Non-ASCII characters on the commandline, it looks normal, but when I
15 > redirect this to a file, the file command identifies the contents of
16 > that file (correctly, it seems to me) as UTF-8. When I boot the old
17 > kernel (which I kept), the same procedure results in a file identified
18 > as iso-8859-1 (and with accordingly fewer bytes). Here are the
19 > contents (the same sentence):
20 >
21 > Kernel 2.6.17:
22 >
23 > "Ich kann es auerdem nicht ndern"
24 >
25 > Kernel 2.6.27:
26 >
27 > "Ich kann es außerdem nicht ändern"
28 >
29 > I grepped the .config files for any options that might have a bearing
30 > on this. The only difference I found was in the first of these four
31 > lines:
32 >
33 > linux-2.6.17:
34 >
35 > # CONFIG_NLS_ASCII is not set
36 > CONFIG_NLS_ISO8859_1=y
37 > CONFIG_NLS_ISO8859_15=y
38 > CONFIG_NLS_UTF8=y
39 >
40 > linux-2.6.27
41 >
42 > CONFIG_NLS_ASCII=y
43 > CONFIG_NLS_ISO8859_1=y
44 > CONFIG_NLS_ISO8859_15=y
45 > CONFIG_NLS_UTF8=y
46 >
47 > So I set $CONFIG_NLS_ASCII differently for the new kernel. But as far
48 > as I understand, these refer to the handling of file names (it's in
49 > the section "file systems"), and only specify what is supported, so I
50 > don't see how this could have an effect on console encoding.
51 >
52 > The only thing I am dead sure about is that the kernel itself must be
53 > the culprit, because when I boot the old kernel, this behaviour goes
54 > away. There is absolutely no change in the system otherwise. (The
55 > $UNICODE variable in /etc/rc.conf is set to "no".)
56 >
57 > Can anyone give me a hint where to look what I have messed up? Emacs,
58 > which I sometimes like to use on the console, is particularly
59 > uncomfortable with this, and I seem to write confusing e-mails.
60 >
61 > Many thanks in advance for any hint,
62 >
63 > Florian
64 >
65 >
66
67 Genrally speaking: switch to utf-8! There are many tools which can
68 convert your files automatically.
69
70 To your issue:
71
72 Well, there still is /etc/conf.d/consolefont which could mess up things.
73 Or the locales...
74
75 But the different bahavior of the two kernels is strange...
76 Is CONFIG_NLS_DEFAULT different of the two kernels? Maybe it's also
77 related to the kernel build in keymap...
78
79 Maybe you should try the gentoo-user-de list, maybe there is someone
80 whon ran into the same problem...
81
82 HTH
83 Sebastian
84
85 --
86 " Religion ist das Opium des Volkes. " Karl Marx
87
88 SEB@STI@N GÜNTHER mailto:samson@××××××××××××××××.de

Replies

Subject Author
Re: [gentoo-user] Kernel update messed up console encoding "Florian v. Savigny" <lorian@××××××××.de>