After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733007 - nmtui: List does not show network names when trying to activate a Wi-Fi connection with non-UTF-8 locale
nmtui: List does not show network names when trying to activate a Wi-Fi conne...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmtui
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-10 13:51 UTC by Michael Biebl
Modified: 2014-07-16 20:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nmtui screenshot (18.53 KB, image/png)
2014-07-10 13:51 UTC, Michael Biebl
  Details
tui: fix Wi-Fi section of "nmtui connect" list in non-UTF-8 locales (4.68 KB, patch)
2014-07-10 19:39 UTC, Dan Winship
committed Details | Review

Description Michael Biebl 2014-07-10 13:51:26 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>
Comment 1 Michael Biebl 2014-07-10 13:51:48 UTC
Created attachment 280393 [details]
nmtui screenshot
Comment 2 Michael Biebl 2014-07-10 13:56:19 UTC
When running "nmcli c", the available Wi-Fi connections are properly shown.
Comment 3 Michael Biebl 2014-07-10 13:56:59 UTC
For completeness sake: the connections are stored using the keyfile plugin
Comment 4 Michael Biebl 2014-07-10 15:45:49 UTC
I found the
Comment 5 Michael Biebl 2014-07-10 15:49:09 UTC
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
Comment 6 Dan Winship 2014-07-10 19:39:01 UTC
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.
Comment 7 Thomas Haller 2014-07-11 13:25:45 UTC
looks good
Comment 8 Dan Williams 2014-07-16 14:51:10 UTC
Looks good to  me too.
Comment 9 Dan Winship 2014-07-16 16:06:29 UTC
Attachment 280448 [details] pushed as dd2e751 - tui: fix Wi-Fi section of "nmtui connect" list in non-UTF-8 locales