menuconfig and UTF-8
Hi.
I'm using UTF-8 and new changes in Makefile (2.6.5-rc3/2.6.5-final) broke using menuconfig on linux console (xterm works ok).
$ locale LANG=POSIX LC_CTYPE=en_US.UTF-8 LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=
This patch fixes it:
Makefile +0 -1
@@ -114,7 +114,6 @@ LC_ALL := endif LC_COLLATE := C -LC_CTYPE := C export LANG LC_ALL LC_COLLATE LC_CTYPE srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
Signature · 4 lines
Marcel Sebek jabber: [email protected] ICQ: 279852819 linux user number: 307850 GPG ID: 5F88735E GPG FP: 0F01 BAB8 3148 94DB B95D 1FCA 8B63 CA06 5F88 735E
Quoted 4 lines · Marcel Sebek
Hi.
I'm using UTF-8 and new changes in
Makefile(2.6.5-rc3/2.6.5-final) broke using menuconfig on linux console (xterm works ok).
Could you please explain how it 'broke' menuconfig. It works for me, but I have no fancy locale setup.
Thanks,
Sam
Quoted 9 lines · Sam Ravnborg
Quoted 4 lines · Marcel Sebek
Hi.
I'm using UTF-8 and new changes in
Makefile(2.6.5-rc3/2.6.5-final) broke using menuconfig on linux console (xterm works ok).Could you please explain how it 'broke' menuconfig. It works for me, but I have no fancy locale setup.
I have LC_CTYPE=en_US.UTF-8. No LC_ALL or other locale variables set. I run unicode_start on console and then menuconfig stops working right. It prints ISO-8859-1 chars to UTF-8 terminal, which causes incorrect indentation (UTF-8 has multi byte chars) and absence of frames.
I cannot get screenshot from console because I don't use framebuffer and in xterm it works correctly (don't know why).
Signature · 4 lines
Marcel Sebek jabber: [email protected] ICQ: 279852819 linux user number: 307850 GPG ID: 5F88735E GPG FP: 0F01 BAB8 3148 94DB B95D 1FCA 8B63 CA06 5F88 735E
Quoted 2 lines · [email protected] (Marcel Sebek) writes:
I cannot get screenshot from console because I don't use framebuffer and in xterm it works correctly (don't know why).
cat /dev/vcsX
Signature · 2 lines
Måns Rullgård [email protected]
Quoted 8 lines · Måns Rullgård
Quoted 2 lines · [email protected] (Marcel Sebek) writes:
I cannot get screenshot from console because I don't use framebuffer and in xterm it works correctly (don't know why).
cat
/dev/vcsX
Thanks. I've attached both correct and incorrect screenshots.
Signature · 4 lines
Marcel Sebek jabber: [email protected] ICQ: 279852819 linux user number: 307850 GPG ID: 5F88735E GPG FP: 0F01 BAB8 3148 94DB B95D 1FCA 8B63 CA06 5F88 735E
Linux Kernel v2.6.5 Configuration ------------------------------------------------------------------------------ +---------------------- Linux Kernel Configuration -----------------------+ | Arrow keys navigate the menu. <Enter> selects submenus --->. | | Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, | | <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. | | Legend: [*] built-in [ ] excluded <M> module < > module capable | | +---------------------------------------------------------------------+ | | | Code maturity level options ---> | | | | General setup ---> | | | | Loadable module support ---> | | | | Processor type and features ---> | | | | Power management options (ACPI, APM) ---> | | | | Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> | | | | Executable file formats ---> | | | | Device Drivers ---> | | | | File systems ---> | | | | Profiling support ---> | | | | Kernel hacking ---> | | | +--------v(+)---------------------------------------------------------+ | +-------------------------------------------------------------------------+ | <Select> < Exit > < Help > | +-------------------------------------------------------------------------+
Linux Kernel v2.6.5 Configuration Linux Kernel Configuration Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. Legend: [*] built-in [ ] excluded <M> module < > module capable Code maturity level options ---> General setup ---> Loadable module support ---> Processor type and features ---> Power management options (ACPI, APM) ---> Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> Executable file formats ---> Device Drivers ---> File systems ---> Profiling support ---> Kernel hacking ---> (+) <Select> < Exit > < Help >
Here is another patch. It saves LC_CTYPE value to a temporary variable and restores it for *config targets. It fixes the problem with menuconfig and UTF-8 console.
Makefile +8 -2
@@ -131,14 +131,20 @@ endif # Make sure we're not wasting cpu-cycles doing locale handling, yet do make -# sure error messages appear in the user-desired language +# sure error messages appear in the user-desired language and LC_CTYPE is +# preserved for *config targets ifdef LC_ALL LANG := $(LC_ALL) LC_ALL := endif LC_COLLATE := C +ifdef LC_CTYPE +SAVED_LC_CTYPE := $(LC_CTYPE) +else +SAVED_LC_CTYPE := C +endif LC_CTYPE := C -export LANG LC_ALL LC_COLLATE LC_CTYPE +export LANG LC_ALL LC_COLLATE LC_CTYPE SAVED_LC_CTYPE srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) TOPDIR := $(srctree)
scripts/kconfig/Makefile +3 -0
@@ -4,6 +4,9 @@ .PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig +LC_CTYPE := $(SAVED_LC_CTYPE) +export LC_CTYPE + xconfig: $(obj)/qconf $< arch/$(ARCH)/Kconfig
Signature · 4 lines
Marcel Sebek jabber: [email protected] ICQ: 279852819 linux user number: 307850 GPG ID: 5F88735E GPG FP: 0F01 BAB8 3148 94DB B95D 1FCA 8B63 CA06 5F88 735E