Bug 342697

Summary: Garbled SSID displayed when editing a wifi connection that has a CJK(non-ASCII) SSID
Product: [Plasma] plasma-nm Reporter: V字龍(Vdragon) <Vdragon.Taiwan>
Component: editorAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED FIXED    
Severity: normal CC: jgrulich
Priority: NOR    
Version: 0.9.3.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.2.0
Sentry Crash Report:
Attachments: Patch that fixes the issue in 0.9.3.3 code

Description V字龍(Vdragon) 2015-01-10 15:30:39 UTC
Refer "Steps to Reproduce".

Reproducible: Always

Steps to Reproduce:
1. Add a new Wifi connection that has a non-ASCII SSID(for example, "V字龍的私人無線網路") and save it.
2. Edit the previously created connection
3. Checkout the "SSID" field of the connection

Actual Results:  
Garbled text are shown in the text box.
Screenshot http://pix.toile-libre.org/upload/original/1420903180.png

Expected Results:  
SSID is displayed as-is.

OS distribution: Ubuntu GNU/Linux 14.04 x86(32-bit)
Desktop environment: KDE from Kubuntu Backports PPA
Locale: zh_TW.UTF-8
Comment 1 V字龍(Vdragon) 2015-01-10 17:23:38 UTC
Created attachment 90326 [details]
Patch that fixes the issue in 0.9.3.3 code

I managed to fix the issue using limited C++ and Qt knowledge, here's the patch.  However I've no idea whether the change is adequate or not, please review.
Comment 2 Lukáš Tinkl 2015-01-11 18:45:04 UTC
Git commit 29268b824e8714323989190a569e329c65c191e8 by Lukáš Tinkl.
Committed on 11/01/2015 at 18:43.
Pushed by lukas into branch 'Plasma/5.2'.

fix display of non-ASCII SSIDs

patch by V字龍(Vdragon), thanks

M  +1    -1    libs/editor/settings/wificonnectionwidget.cpp

http://commits.kde.org/plasma-nm/29268b824e8714323989190a569e329c65c191e8
Comment 3 Lukáš Tinkl 2015-01-11 18:48:41 UTC
Git commit 88f883ce5c9ccd7d672285a3f4af4d8e76541367 by Lukáš Tinkl.
Committed on 11/01/2015 at 18:43.
Pushed by lukas into branch '0.9.3'.

fix display of non-ASCII SSIDs

patch by V字龍(Vdragon), thanks

M  +1    -1    libs/editor/settings/wificonnectionwidget.cpp

http://commits.kde.org/plasma-nm/88f883ce5c9ccd7d672285a3f4af4d8e76541367
Comment 4 Jan Grulich 2015-03-02 14:11:02 UTC
Git commit 54f137512abba7b539a09418c03f6e73015344ba by Jan Grulich.
Committed on 02/03/2015 at 14:06.
Pushed by grulich into branch 'master'.

Make sure SSID will be displayed properly when using non-ASCII characters

M  +1    -1    kded/passworddialog.cpp
M  +1    -1    libs/editor/settings/wificonnectionwidget.cpp
M  +2    -2    libs/models/networkmodel.cpp

http://commits.kde.org/plasma-nm/54f137512abba7b539a09418c03f6e73015344ba
Comment 5 Jan Grulich 2015-03-02 14:11:27 UTC
Git commit cbd1e7818471ae382fb25881c138e0228a44dac4 by Jan Grulich.
Committed on 02/03/2015 at 14:06.
Pushed by grulich into branch 'Plasma/5.2'.

Make sure SSID will be displayed properly when using non-ASCII characters

M  +1    -1    kded/passworddialog.cpp
M  +1    -1    libs/editor/settings/wificonnectionwidget.cpp
M  +2    -2    libs/models/networkmodel.cpp

http://commits.kde.org/plasma-nm/cbd1e7818471ae382fb25881c138e0228a44dac4
Comment 6 Jan Grulich 2015-03-02 14:19:30 UTC
Git commit b3a7458c495e44f232c64c494bad4ea625fa6468 by Jan Grulich.
Committed on 02/03/2015 at 14:06.
Pushed by grulich into branch '0.9.3'.

Make sure SSID will be displayed properly when using non-ASCII characters

M  +1    -1    kded/passworddialog.cpp
M  +1    -1    libs/editor/settings/wificonnectionwidget.cpp
M  +2    -2    libs/models/networkmodel.cpp

http://commits.kde.org/plasma-nm/b3a7458c495e44f232c64c494bad4ea625fa6468