GNOME Bugzilla – Bug 733007
nmtui: List does not show network names when trying to activate a Wi-Fi connection with non-UTF-8 locale
Last modified: 2014-07-16 20:17:56 UTC
Version: 0.9.10.0 When opening nmtui-connect, the list of Wi-Fi connections doesn't show any connection names (see attached screenshots). I can browse through the list. When selecting the first entry, the button changes to <Deactivate>, and for the other list entries the button is called <Activate>
Created attachment 280393 [details] nmtui screenshot
When running "nmcli c", the available Wi-Fi connections are properly shown.
For completeness sake: the connections are stored using the keyfile plugin
I found the
I found the underlying problem: I was using LANG=C as root user. With that locale, the list of Wi-Fi networks is is not properly rendered (most likely due to the signal strength symbols). With an UTF-8 locale, like C.UTF-8 or de_DE.UTF-8 made
Created attachment 280448 [details] [review] tui: fix Wi-Fi section of "nmtui connect" list in non-UTF-8 locales In locales where the Wi-Fi signal-strength characters couldn't be represented (eg, LANG=C), the entire Wi-Fi SSID + signal strength string would fail to convert, causing the Wi-Fi section of the connection list to show up as a series of blank lines. Fix this by testing beforehand whether the characters can convert, and falling back to plain ASCII if not. (And also, fix the similar code in nmt-newt-section.c, which got broken when nmt_newt_locale_from_utf8() was changed to never return NULL.) Also, for paranoia, represent the signal-strength strings via \nnn escapes rather than actual UTF-8 data, to guarantee that they get compiled to the expected values even if the source files get re-encoded.
looks good
Looks good to me too.
Attachment 280448 [details] pushed as dd2e751 - tui: fix Wi-Fi section of "nmtui connect" list in non-UTF-8 locales