Bug 339710 - Muon displays garbled characters when zh_TW locale is used.
Summary: Muon displays garbled characters when zh_TW locale is used.
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Applications
Component: libqapt (show other bugs)
Version: 2.2.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL: http://i.imgur.com/qgKCvUj.jpg#obseluted
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-05 19:15 UTC by V字龍(Vdragon)
Modified: 2014-12-28 19:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Similar window when Muon is run with env LANGUAGE=en (19.89 KB, image/png)
2014-12-28 18:51 UTC, V字龍(Vdragon)
Details
Similar window when Muon is run with default LANGUAGE environment(zh_TW:zh_HK:zh:en) (24.22 KB, image/png)
2014-12-28 18:53 UTC, V字龍(Vdragon)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V字龍(Vdragon) 2014-10-05 19:15:00 UTC
Please refer the "URL" for this issue.

Reproducible: Always

Steps to Reproduce:
1. Change to zh_TW locale
2. Let Muon fails to mark certain package

Actual Results:  
As the URL

Expected Results:  
CJK characters rendered normally
Comment 1 Aleix Pol 2014-10-08 08:36:54 UTC
Can you provide some screenshot?
I need to have something to start from.
Comment 2 V字龍(Vdragon) 2014-10-08 08:44:31 UTC
(In reply to Aleix Pol from comment #1)
> Can you provide some screenshot?
> I need to have something to start from.

There's already a screenshot at the URL field(http://i.imgur.com/qgKCvUj.jpg)
Comment 3 Harald Sitter 2014-12-28 16:25:14 UTC
Please also get a screenshot of that same window in english.

I am reasonable certain these are string that come out of apt-pkg, so unless we run it through a latinstring somewhere it's probably a bug outside our reach.
Comment 4 V字龍(Vdragon) 2014-12-28 18:51:47 UTC
Created attachment 90148 [details]
Similar window when Muon is run with env LANGUAGE=en
Comment 5 V字龍(Vdragon) 2014-12-28 18:53:38 UTC
Created attachment 90149 [details]
Similar window when Muon is run with default LANGUAGE environment(zh_TW:zh_HK:zh:en)
Comment 6 V字龍(Vdragon) 2014-12-28 18:58:55 UTC
(In reply to Harald Sitter from comment #3)
> Please also get a screenshot of that same window in english.
I can't regenerate the same window on this system, so I pick another package(hime-anthy) on this case:
* Similar window when Muon is run with default LANGUAGE environment(zh_TW:zh_HK:zh:en) (*garbled* text)
* Similar window when Muon is run with env LANGUAGE=en (english)

> I am reasonable certain these are string that come out of apt-pkg, so unless
> we run it through a latinstring somewhere it's probably a bug outside our
> reach.
I'm suspect there's a Unicode string being treated as latinstring here.
Comment 7 V字龍(Vdragon) 2014-12-28 19:00:13 UTC
Considered the status unconfirmed, again.
Comment 8 Harald Sitter 2014-12-28 19:13:19 UTC
Git commit ca47d57cd44f40bfe774ab2c15b442467cbca8b1 by Harald Sitter.
Committed on 28/12/2014 at 19:12.
Pushed by sitter into branch 'master'.

run typeName string through QString as utf8 not latin1

it contains the localized name, not the latin1 base

M  +1    -1    src/dependencyinfo.cpp

http://commits.kde.org/libqapt/ca47d57cd44f40bfe774ab2c15b442467cbca8b1
Comment 9 V字龍(Vdragon) 2014-12-28 19:15:09 UTC
(In reply to Harald Sitter from comment #8)
> run typeName string through QString as utf8 not latin1
> 
> it contains the localized name, not the latin1 base
> 
> M  +1    -1    src/dependencyinfo.cpp
> 
> http://commits.kde.org/libqapt/ca47d57cd44f40bfe774ab2c15b442467cbca8b1
Great!  Thanks for the effort!
Comment 10 V字龍(Vdragon) 2014-12-28 19:37:04 UTC
Just leave a note that I've tested the patch and confirmed that it's working, thanks again!