Skip to contentSkip to conversation

package/petitboot: prefer UTF-8 support

Buildroot Yann E. MORIN 1 participant 1 message Feb 7, 2024

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=026338f66bdb2d9436898bd968a3f22995851b92
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The petitboot UI looks much nicer in a Unicode locale:

* Items in the language selection submenu use multibyte Unicode characters. In other locales, they say "Unable to display text in this locale".

* The combination of TERM=linux with a UTF-8 locale is required to trigger a special-case workaround in ncurses code[1]. Without this, line-drawing characters in the menu look like q's.

Turn on wchar support in ncurses, and add a reminder that a UTF-8 locale should be generated for things to look right.

[1] https://invisible-island.net/ncurses/ncurses.faq.html#no_line_drawing

---
 package/petitboot/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/petitboot/Config.in +4 -0
index 6a3d476b11..533c7a9f29 100644
@@ -10,6 +10,7 @@ config BR2_PACKAGE_PETITBOOT
 	select BR2_PACKAGE_ELFUTILS
 	select BR2_PACKAGE_LVM2 # devmapper
 	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_NCURSES_WCHAR
 	# run-time dependencies
 	select BR2_PACKAGE_KEXEC if !BR2_PACKAGE_KEXEC_LITE_ARCH_SUPPORTS
 	select BR2_PACKAGE_KEXEC_LITE if BR2_PACKAGE_KEXEC_LITE_ARCH_SUPPORTS && !BR2_PACKAGE_KEXEC
@@ -18,6 +19,9 @@ config BR2_PACKAGE_PETITBOOT
 	help
 	  Petitboot is a small kexec-based bootloader
 
+	  NOTE: petitboot looks best in a UTF-8 locale; be sure there
+	  is one listed in BR2_GENERATE_LOCALE.
+
 	  http://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html
 
 if BR2_PACKAGE_PETITBOOT

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot