Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32111 - enable utf8 support in console
Summary: enable utf8 support in console
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 55343 (view as bug list)
Depends on:
Blocks: 29707
  Show dependency tree
 
Reported: 2003-10-27 10:26 UTC by Thomas Scheffler
Modified: 2004-10-19 00:12 UTC (History)
9 users (show)

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


Attachments
rc.conf with error in key mapping (rc.conf,3.19 KB, text/plain)
2003-10-27 10:28 UTC, Thomas Scheffler
Details
rc.conf.unicode.patch (rc.conf.unicode.patch,610 bytes, patch)
2004-09-21 10:47 UTC, Heinrich Wendel (RETIRED)
Details | Diff
keymaps.unicode.patch (keymaps.unicode.patch,1.01 KB, patch)
2004-09-21 10:48 UTC, Heinrich Wendel (RETIRED)
Details | Diff
utf8-console.patch (utf8-console.patch,3.40 KB, patch)
2004-10-10 01:55 UTC, SpanKY
Details | Diff
utf8-console2.patch (utf8-console2.patch,4.36 KB, patch)
2004-10-15 10:49 UTC, SpanKY
Details | Diff
Enable console unicode support in my french setup. (utf8-console2-french-working.patch,4.36 KB, patch)
2004-10-18 09:34 UTC, Sylvain BERTRAND
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Scheffler 2003-10-27 10:26:42 UTC
At startup there should be the keymaping assigned as specified in rc.conf. But there seems to be a parsing error I can't explain since the keymap file is correct to me. I have reemerged kbd too but it brought nothing.
Here is what's on screen at startup:

* Loading key mappings ...
unknown keysym 'Meta_acute'
/usr/share/keymaps/i386/qwertz/de-latin1.map.gz:34: parse error
syntax error in map file
key bindings not changed
* Error loading key mappings                                     [!!]
Comment 1 Thomas Scheffler 2003-10-27 10:28:18 UTC
Created attachment 19858 [details]
rc.conf with error in key mapping
Comment 2 Xavier Neys (RETIRED) gentoo-dev 2003-10-27 12:15:12 UTC
vim /usr/share/keymaps/i386/qwertz/de-latin1.map.gz and comment the offending
line

#        alt     keycode  13 = Meta_acute

vim is smart enough to unzip/edit/rezip file
Meta_acute does not look like it should even exist.
Comment 3 Thomas Scheffler 2003-10-27 12:35:27 UTC
keycode  13 = dead_acute       dead_grave
        alt     keycode  13 = Meta_acute
        shift   alt   keycode  13 = Meta_grave

This is from the SuSE de-latin1.map.gz so there should be no problem with
that Meta_acute in that file. Both kbds are version 1.06. Is that name "Meta_acute"
anyhow related to the kernel maybe? Since I use kernel 2.6-test8. But I don't
know since when this kernel exists.
Comment 4 Thomas Scheffler 2003-10-27 12:44:28 UTC
I meant "problem" when I said "kernel". So I don't really know since when
this problem exists. Sorry for beeing such a complete retard.
Comment 5 Xavier Neys (RETIRED) gentoo-dev 2003-10-27 13:19:49 UTC
My kernel is 2.4.20
There is no Meta_acute in
/usr/src/linux/drivers/char/defkeymap.map

Same applies to 2.4.19, 2.4.22, 2.5.75 and 2.6.0-test6

It might be/have been a Suse hack or it has been removed.
I can't easily find any reference to a meta_acute (google gives me only 4
links) and I don't feel like downloading a suse kernel.

Replace meta-acute by whatever you expect alt-4 (or what is below the 4)
to do on your keyboard.

Sorry I can't help any further.
Comment 6 Thomas Scheffler 2003-10-27 13:24:25 UTC
dumpkeys -l|grep Meta_acute on SuSE gives no answer so Meta_acute is indeed
a false keysym. So there are two questions left.

1.) Why was it working (till what ever)?
2.) Why does it ship with mappings with unknown keysyms!
3.) Does it work at your side with my settings (watch attached rc.conf)?
4.) Was I really saying something about "two questions left"?
Comment 7 Xavier Neys (RETIRED) gentoo-dev 2003-10-27 16:03:46 UTC
FYI, this is my rc.conf (partly):
KEYMAP="us-happyhacking"                                                
                                                                        
                                              EXTENDED_KEYMAP=
SET_WINDOWKEYS="yes"

I noticed the same problem as you did with the "-u" in front of the keymap.
When passed to loadkeys, it causes the error. When loadkeys is called without
it, your keymap is accepted. As you most likely want the keep the -u, I suggest
you comment out the offending line in your keymap.

Answers in sequence
1.) Until "-u " was prepended to keymap name and/or processed by loadkeys
?
2.) Because it takes someone to notice and report. You did.
3.) works without "-u", not with it.
4.) Was there a fourth point ?
Comment 8 Thomas Scheffler 2003-10-28 02:19:56 UTC
when commented out no errors appearing anymore but umlauts (
Comment 9 Thomas Scheffler 2003-10-28 02:19:56 UTC
when commented out no errors appearing anymore but umlauts (üÜöÖäÄ) won't
come correctly on the screen following warnings may depend on that issue:

plus before udiaeresis ignored
plus before Udiaeresis ignored
plus before odiaeresis ignored
plus before Odiaeresis ignored
plus before adiaeresis ignored
plus before Adiaeresis ignored

So this doesn't seems to be a simple one, when I need UTF-8 support on console,
too...
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-29 11:55:33 UTC
What about this patch:

--
Index: init.d/keymaps
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/keymaps,v
retrieving revision 1.17
diff -u -r1.17 keymaps
--- init.d/keymaps      16 Jul 2003 19:38:51 -0000      1.17
+++ init.d/keymaps      29 Oct 2003 19:54:41 -0000
@@ -34,6 +34,7 @@
        if [ "$1" = "-u" ]
        then
                /usr/bin/kbd_mode -u
+               KEYMAP="${KEYMAP/-u}"
        fi
  
        # New kbd support ...
Comment 11 Thomas Scheffler 2003-11-14 05:52:48 UTC
The patch seems to fix most issues but I'm not able to input a '@'-sign which is Alt-Gr+Q on my keyboard. I just hear a system beep if I try to...
All other signs that need Alt-Gr are available it seems. So why @ not?
Comment 12 Thomas Scheffler 2003-11-14 08:26:08 UTC
unicode_start $CONSOLEFONT should be started somewhere to
after doing this shell support for unicode seems to function but this should be done after consolefont and keymap initscripts or before or in there I don't know really :o)
So maybe package maintainers of that two should be informed and need to handle this since unicode support is quite important...
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-21 06:33:04 UTC
ok to summarize this:

can anybody please explain what the correct way of enabling utf-8 in the console is?
Comment 14 Xavier Neys (RETIRED) gentoo-dev 2004-09-21 06:45:45 UTC
You might want to read this thread on f.g.o
http://forums.gentoo.org/viewtopic.php?t=221588
The author can't use the compose key to type utf8 chars.
Displaying utf8 chars works but I haven't been able to type utf8 chars either.
The unicode howto on tldp is not very helpful
http://www.tldp.org/HOWTO/Unicode-HOWTO-2.html#ss2.1
Comment 15 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-21 10:46:51 UTC
Here are two new patches for /etc/init.d/keymaps and /etc/rc.conf to automatically exec unicode_start, azarah please include them ;)
Comment 16 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-21 10:47:34 UTC
Created attachment 40106 [details, diff]
rc.conf.unicode.patch
Comment 17 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-21 10:48:20 UTC
Created attachment 40107 [details, diff]
keymaps.unicode.patch
Comment 18 SpanKY gentoo-dev 2004-10-10 01:51:39 UTC
*** Bug 55343 has been marked as a duplicate of this bug. ***
Comment 19 SpanKY gentoo-dev 2004-10-10 01:55:15 UTC
Created attachment 41443 [details, diff]
utf8-console.patch

could you guys review this and see if this works for you both ?

you guys had slightly different patches ... for one thing, one of you echoed
'\033%G' into the tty device while the other echoed '\033%K' ... which is
correct ?
Comment 20 Sebastian Dröge 2004-10-15 08:56:34 UTC
'\033%G' should be correct as /usr/bin/unicode_start also uses that... unicode_start belongs to kbd

in the latest patch you echo both values to the ttys and there's a syntax error in keymap... a missing "do" in the for loop
Comment 21 SpanKY gentoo-dev 2004-10-15 10:49:13 UTC
Created attachment 41903 [details, diff]
utf8-console2.patch

this incorporates your suggestions/fixes ... please try this out :)
Comment 22 Sebastian Dröge 2004-10-16 05:53:34 UTC
ebegin "Setting terminal encoding to ${termencoding}"

has to be

ebegin "Setting terminal encoding to ${termmsg}"

other than that it seems ok... i'll try later
Comment 23 SpanKY gentoo-dev 2004-10-16 09:44:13 UTC
i'm happy with this last version (with your added termmsg fix), so if you guys say it works for you, i'll commit it
Comment 24 Sylvain BERTRAND 2004-10-18 09:34:40 UTC
Created attachment 42107 [details, diff]
Enable console unicode support in my french setup.

I did small modifications on the original utf8-console2.patch. As far as my
french gentoo setup is concerned, it does work for me (the original did not).
Comment 25 SpanKY gentoo-dev 2004-10-18 17:04:10 UTC
ok, thanks for the fixes, added all of the latest work to cvs

look for it in 1.11.3+