* Re: [PATCH] vconsole: properly set terminal UTF-8 mode [not found] ` <20101110224457.GE319@tango.0pointer.de> @ 2011-02-17 18:52 ` Andrey Borzenkov [not found] ` <AANLkTinvswsHGgEjnLf_dF+RPvc8pZH+Ku+o-2guyzsa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Andrey Borzenkov @ 2011-02-17 18:52 UTC (permalink / raw) To: Lennart Poettering; +Cc: initramfs, Kay Sievers, systemd-devel On Thu, Nov 11, 2010 at 1:44 AM, Lennart Poettering <lennart@poettering.net> wrote: > On Fri, 05.11.10 19:14, Andrey Borzenkov (arvidjaar@gmail.com) wrote: > >> >> It is rather interesting. I was testing unrelated patch for dracut >> >> using dracut tip. It turned out, dracut now installs >> >> systemd-vconsole-setup when available. Unfortunately it also also >> >> changed parsing of configuration files so no locale config was >> >> installed. Which caused vconsole-setup assume we are in non-UNICODE >> >> mode and disable it. >> >> >> >> I still believe we should not make any assumption about console state >> >> at the time of systemd startup and ensure it is configured as >> >> requested. >> > >> > I see, then we should fix the vconsole setup if stuff goes wrong here. >> >> That is basically what my patch does. >> >> > We can safely assume that the kernel we rely on is utf8 by default. >> > >> >> OK, do you want me to resubmit with fixed description? > > I think it is safe to assume that the kernel enables UTF8 by default. I > see little need to redo what the kernel has been doing anyway already. > > Or, in other words: if vconsole-setup for reason didn't work properly in > the initrd we probably should fix that, not then try to work-around this > be enabling UTF8 a second time. > As it stands now, dracut 008 in generic (not hostonly) mode explicitly disables UTF-8 because UNICODE is not set: modules.d/10i18n/console_init: set_keyboard() { local param [ "${UNICODE}" = 1 ] && param=-u || param=-a kbd_mode ${param} } The problem is, you do not know whether UNICODE is not set because system is configured for non-UNICODE or because we do not know yet. That's basically the same problem we already had in the past, and that was fixed (for hostonly) by commit 161da365e23cd4ac85f06e928a799f3427d8009d Author: Andrey Borzenkov <arvidjaar@gmail.com> Date: Sun Nov 7 00:14:49 2010 +0300 i18n: do not use systemd-vconsole-setup systemd-vconsole-setup was not designed to be run from udevd. It checks locale environment to decide, whether UNICODE should be enabled or disabled. Normally environment is setup by systemd; but the only environment available in udev rules is those from device properties. It means systemd-vconsole-setup always assumes default C locale and disables UNICODE. Revert to using built-in console_init which explicitly imports locale settings from /etc/vconsole.conf. Alternative is to revert 6545b9d7 and call console_init directly :) I do not really see how to fix it in dracut given current configuration. May be we should gradually move to using UNICODE=0 or UNICODE=no to *disable* it, but still right now generic dracut image + systemd is broken: Feb 19 03:20:51 localhost kernel: systemd-vconsole-setup[341]: loadkeys: warning: loading Unicode keymap on non-Unicode console Feb 19 03:20:51 localhost kernel: systemd-vconsole-setup[341]: (perhaps you want to do `kbd_mode -u'?) So I humbly ask to revise whether my patch is acceptable. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <AANLkTinvswsHGgEjnLf_dF+RPvc8pZH+Ku+o-2guyzsa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [systemd-devel] [PATCH] vconsole: properly set terminal UTF-8 mode [not found] ` <AANLkTinvswsHGgEjnLf_dF+RPvc8pZH+Ku+o-2guyzsa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-02-18 8:13 ` Harald Hoyer [not found] ` <4D5E2A2D.4060703-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Harald Hoyer @ 2011-02-18 8:13 UTC (permalink / raw) To: Andrey Borzenkov Cc: Lennart Poettering, Kay Sievers, systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, initramfs Am 17.02.2011 19:52, schrieb Andrey Borzenkov: > As it stands now, dracut 008 in generic (not hostonly) mode explicitly > disables UTF-8 because UNICODE is not set: > > modules.d/10i18n/console_init: > > set_keyboard() { > local param > > [ "${UNICODE}" = 1 ] && param=-u || param=-a > kbd_mode ${param} > } > > The problem is, you do not know whether UNICODE is not set because > system is configured for non-UNICODE or because we do not know yet. You are right... UNICODE should default to 1 in dracut. Will change. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <4D5E2A2D.4060703-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [systemd-devel] [PATCH] vconsole: properly set terminal UTF-8 mode [not found] ` <4D5E2A2D.4060703-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2011-02-18 8:39 ` Harald Hoyer 0 siblings, 0 replies; 3+ messages in thread From: Harald Hoyer @ 2011-02-18 8:39 UTC (permalink / raw) To: Andrey Borzenkov Cc: Lennart Poettering, Kay Sievers, systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, initramfs Am 18.02.2011 09:13, schrieb Harald Hoyer: > Am 17.02.2011 19:52, schrieb Andrey Borzenkov: >> As it stands now, dracut 008 in generic (not hostonly) mode explicitly >> disables UTF-8 because UNICODE is not set: >> >> modules.d/10i18n/console_init: >> >> set_keyboard() { >> local param >> >> [ "${UNICODE}" = 1 ] && param=-u || param=-a >> kbd_mode ${param} >> } >> >> The problem is, you do not know whether UNICODE is not set because >> system is configured for non-UNICODE or because we do not know yet. > > You are right... UNICODE should default to 1 in dracut. Will change. changed to vconsole.font.unicode=1 alias UNICODE=1 and fixed the hostonly mode legacy configuration file parsing. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-18 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1288967715-3513-1-git-send-email-arvidjaar@gmail.com>
[not found] ` <AANLkTik9bv1U5_y6QV1jCJB5mj-DT3zZUucdsVmo+6Vy@mail.gmail.com>
[not found] ` <AANLkTi=GFHnhnagJ-7ZfGB62oQxVeT+YOZH003CA16Rf@mail.gmail.com>
[not found] ` <AANLkTi=_uDMFudNq4+jcojgGgoKvU0f2ySb+_7fTaZj7@mail.gmail.com>
[not found] ` <AANLkTi=8q8K3ST5_QXyHQuUCM=W0u060wcBmBRRBWm+9@mail.gmail.com>
[not found] ` <20101110224457.GE319@tango.0pointer.de>
2011-02-17 18:52 ` [PATCH] vconsole: properly set terminal UTF-8 mode Andrey Borzenkov
[not found] ` <AANLkTinvswsHGgEjnLf_dF+RPvc8pZH+Ku+o-2guyzsa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-18 8:13 ` [systemd-devel] " Harald Hoyer
[not found] ` <4D5E2A2D.4060703-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-02-18 8:39 ` Harald Hoyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox