Bug 12047 - net monitor UI treats strings as ascii caracters instead of utf8 (=> doesn't handle Chinese word-wrapping correctly)
Summary: net monitor UI treats strings as ascii caracters instead of utf8 (=> doesn't ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA4-32-OK MGA4-64-OK advisory
Keywords: Junior_job, validated_update
Depends on:
Blocks:
 
Reported: 2013-12-19 03:41 CET by You-Cheng Hsieh
Modified: 2014-02-12 19:12 CET (History)
6 users (show)

See Also:
Source RPM: net_monitor-0.15-1mga4
CVE:
Status comment:


Attachments
Screenshot show misdisplayed message (22.06 KB, image/png)
2013-12-19 03:42 CET, You-Cheng Hsieh
Details
bind translations as UTF-8 (308 bytes, patch)
2014-02-10 18:18 CET, Thierry Vignaud
Details | Diff

Description You-Cheng Hsieh 2013-12-19 03:41:11 CET
Description of problem:
When network accounting disabled, the Chinese (Traditional) message is not displayed correctly with word wrapping.

Version-Release number of selected component (if applicable):
0.15-1mga4

How reproducible:
Should happen with languages using double byte character set, e.g. Chinese, Japanese, Korean. Though only Traditional Chinese is translated for net_monitor now.

Steps to Reproduce:
(only when locale is zh_TW)
1.Disable network accouting if its enabled.
(need restart network if you do so.)
2.right click network applet on systray, select monitor (網路ç£æ§).
3.the message indicating that user need to enable network accounting is not displayed correctly.


Reproducible: 

Steps to Reproduce:
Comment 1 You-Cheng Hsieh 2013-12-19 03:42:15 CET
Created attachment 4640 [details]
Screenshot show misdisplayed message
Comment 2 Thierry Vignaud 2013-12-19 09:56:04 CET
Can you update the "RPM Package" field with the exact version you're using?

I guess the issue is that it considers the string as an ASCII string instead of a UTF-8 string :-(

Keywords: (none) => Junior_job
CC: (none) => thierry.vignaud
Hardware: i586 => All

Thierry Vignaud 2013-12-19 09:57:43 CET

Summary: net monitor UI not handle Chinese word-wrapping correctly => net monitor UI treats strings as ascii caracters instead of utf8 (=> doesn't handle Chinese word-wrapping correctly)

Comment 3 You-Cheng Hsieh 2013-12-19 13:40:09 CET
The version installed is 0.15-1mga4. 

Thank you very much for your assistance.

Source RPM: net_monitor => net_monitor-0.15-1mga4

Thierry Vignaud 2013-12-19 18:09:04 CET

CC: (none) => guillomovitch, misc

Thierry Vignaud 2014-02-10 18:06:09 CET

Assignee: bugsquad => thierry.vignaud

Comment 4 Thierry Vignaud 2014-02-10 18:18:53 CET
Created attachment 4972 [details]
bind translations as UTF-8

I cannot reproduce your issue (I think this screenshot is another message)
Anyway, it looks indeed like the code is broken.
Can you test this patch?
Comment 5 Mageia Robot 2014-02-10 18:47:20 CET
commit 72af4d63cc60a0415f54f8184e18097d7b9d3276
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Feb 10 18:43:22 2014 +0100

    fix treating UTF-8 strings as ascii (mga#12047)
    
    bug present since commit 94d93f98fa69fcca2b9743bdf43429f22b528a70
    gtk+ only handle Unicode strings (since gtk+2)
---
 Commit Link:
   http://gitweb.mageia.org/software/net_monitor/commit/?id=72af4d63cc60a0415f54f8184e18097d7b9d3276
Comment 6 Thierry Vignaud 2014-02-10 18:51:11 CET
Fixed in git (& in net_monitor-0.16)


Suggested advisory:
========================
This update fixes several minor issues in net_monitor:
- it fixes a missing interface name in one message
- it fixes treating UTF-8 strings as ascii (mga#12047)
- it silents a warning when there's no wireless device

Status: NEW => ASSIGNED
Assignee: thierry.vignaud => qa-bugs

Rémi Verschelde 2014-02-10 18:54:24 CET

CC: (none) => remi
Version: Cauldron => 4

Comment 7 Mageia Robot 2014-02-10 19:03:37 CET
commit 36cc58a9f05473bb5633e9a2f1436d9b749b8160
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Feb 10 18:54:15 2014 +0100

    fix treating UTF-8 strings as ascii
    
    same issue as in mga#12047 for net_monitor...
---
 Commit Link:
   http://gitweb.mageia.org/software/msec/commit/?id=36cc58a9f05473bb5633e9a2f1436d9b749b8160
Comment 8 claire robinson 2014-02-10 19:24:23 CET
Need srpms and rpms then thierry please.

Whiteboard: (none) => feedback

Comment 9 Thierry Vignaud 2014-02-10 19:27:43 CET
net_monitor-0.16-1.mga4.src.rpm
net_monitor-0.16-1.mga4.x86_64.rpm
net_monitor-0.16-1.mga4.i586.rpm
Comment 10 claire robinson 2014-02-10 19:35:03 CET
You-Cheng Hsieh can you confirm this update fixes the issue you reported please.

Whiteboard: feedback => (none)

Guillaume Rousse 2014-02-10 19:44:57 CET

CC: guillomovitch => (none)

Comment 11 Thierry Vignaud 2014-02-10 20:10:34 CET
I eventually was able to see the garbaged string and it's fixed.

BTW If you want to be able to reproduce such bug for eg: locale XX, just:
- install locales-XX
- reinstall the packages you want to test so that the translations got installed:
  urpmi --replacepkgs --replacefiles net_monitor
- run localedrake, choose the new locale
- save your new ~/.i18n as ~/.i18n.XX
- run localedrake, select back your initial locale
- then you can test a program with either locale, eg:
  (. ~/.i18n.XX; net_monitor)
  eg: for chinese: (. ~/.i18n.zh; net_monitor)
Comment 12 Thierry Vignaud 2014-02-10 20:11:18 CET
For the record, I've fixed the same bug in msec in cauldron (msec-1.1).
Comment 13 You-Cheng Hsieh 2014-02-11 07:23:08 CET
Confirm fixed in version 0.16. Thanks Thierry.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 14 claire robinson 2014-02-11 07:46:17 CET
Please don't close it until this has been pushed to updates.

Which architecture did you confirm with please and also are you able to test with the other one too?

Thanks

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 15 Thierry Vignaud 2014-02-11 07:59:47 CET
Note that the fix is arch independent. I've tested and x86_64 so if You-Cheng has tested on i586, all tests are done.
Comment 16 You-Cheng Hsieh 2014-02-11 08:59:42 CET
I tested on i586 (both mga4 and cauldron), Thanks.

Sorry about closing; it won't happen again.
Comment 17 Samuel Verschelde 2014-02-11 09:03:56 CET
Usually we won't count the packager's testing in validation for regular updates, but right now we can't refuse that kind of help so consider it tested in both archs.

CC: (none) => stormi
Whiteboard: (none) => MGA4-32-OK MGA4-64-OK

Comment 18 Manuel Hiebel 2014-02-11 22:44:17 CET
Confirmed to be fixed on mga4/64bit, please QA upload advisory and validated.
Comment 19 Rémi Verschelde 2014-02-12 09:49:23 CET
Advisory uploaded.

Could a sysadmin push the update to core/updates in Mageia 4? Thanks!
Rémi Verschelde 2014-02-12 09:49:53 CET

Keywords: (none) => validated_update
Whiteboard: MGA4-32-OK MGA4-64-OK => MGA4-32-OK MGA4-64-OK advisory
CC: (none) => sysadmin-bugs

Comment 20 Thomas Backlund 2014-02-12 19:12:23 CET
Update pushed:
http://advisories.mageia.org/MGAA-2014-0034.html

Status: REOPENED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.