Bug 528279
Summary: | Improperly renders UTF-8 characters | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Alexey Torkhov <atorkhov> | ||||||||||||
Component: | aumix | Assignee: | Gabriel Somlo <somlo> | ||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||
Priority: | low | ||||||||||||||
Version: | rawhide | CC: | avm-xandry, somlo | ||||||||||||
Target Milestone: | --- | ||||||||||||||
Target Release: | --- | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | Linux | ||||||||||||||
Whiteboard: | |||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||
Clone Of: | Environment: | ||||||||||||||
Last Closed: | 2009-10-20 15:32:26 UTC | Type: | --- | ||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||
Documentation: | --- | CRM: | |||||||||||||
Verified Versions: | Category: | --- | |||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||
Embargoed: | |||||||||||||||
Bug Depends On: | 529790 | ||||||||||||||
Bug Blocks: | |||||||||||||||
Attachments: |
|
Description
Alexey Torkhov
2009-10-10 17:35:57 UTC
Created attachment 364347 [details]
Screenshot
Created attachment 364348 [details]
Screenshot
Right locale to start is
LANG=ru_RU.UTF-8 aumix
And it does work fine with fr_FR.UTF-8 (shows accents).
Doesn't work, for example, with:
LANG=zh_CN.UTF-8 aumix
This is due to the language files supplied with aumix using charsets other than UTF-8. For instance, the ru.po file in aumix uses koi8-r, and the zh_CN.po one uses gb2312. Works fine if your LANG is set to ru_RU instead of ru_RU.UTF-8 (or zh_CN instead of zh_CN.UTF-8). I'd be happy to replace the aumix ru.po file (or any other .po for that mater) with an updated version which uses UTF-8 if anyone uploads it (to this bug report would be fine). I am however not qualified (can't write Russian or Chinese, unfortunately) to do it myself. Oh, it has easy fix then—you need just to recode all .po files with recode or iconv in %prep section, like: iconv -f iso-8859-2 -t utf-8 pl.po > pl.po.new; mv pl.po.new pl.po iconv -f koi8-r -t utf-8 ru.po > ru.po.new; mv ru.po.new ru.po iconv -f koi8-u -t utf-8 uk.po > uk.po.new; mv uk.po.new uk.po ... I've checked—them seem to be sane after that. You can use sed magic to automate the process :) grep charset *.po | sed 's|^\(\w*\.po\):.*charset=\([-a-zA-Z0-9]*\)\\n"|iconv -f \2 -t utf-8 \1 > \1.new; sed -i s/charset=\2/charset=utf-8/ \1.new; mv \1.new \1|e' Tried the iconv trick (nice sed kung-fu, BTW :) ) but unfortunately the converted files still look wrong after rebuilding aumix. Not at first glance in an editor mind you, but after compilation. I diff-ed the so-called "utf-8" ru.po against the original koi8-r one, and the patch didn't look right when viewd in the same editor and LANG=ru_RU.UTF-8 setting under which the iconv-ed utf8 ru.po seemed fine. Applying the patch on top of the original koi8-r ru.po also resulted in a file which no longer looked right, in the same editor with the same settings. Any chance you can send me a ru.po file generated in a clean ru_RU.UTF-8 environment, or even better, a patch against the existing aumix ru.po file in which the "+" (add) lines look right in a ru_RU.UTF-8 environment ? I could then try to apply that patch and see if that results in some progress... This also makes me wonder whether diff itself handles utf-8 properly, but I guess we'll find out soon enough... Created attachment 365250 [details]
ru.po converted to utf8
Created attachment 365251 [details]
ru.po patch from old to utf8
Created attachment 365252 [details]
patch for all .po files, but better not to apply it, but convert in %prep or like
I’ve attached files you asked and even patch for all .po files, which, I think, should be result of iconv conversion. I think this is a bug in ncurses (which also explains the weirdness I observed while trying to look at diff results in vim :) ) I opened bug 529790 against ncurses, let's see where that gets us. I'm looking at diff with vim too and it shows it fine. May be, that's something with terminal (I'm using gnome-terminal)? (In reply to comment #11) > I'm looking at diff with vim too and it shows it fine. May be, that's something > with terminal (I'm using gnome-terminal)? Oh, checked the bug, right, it seem not to work properly. Shoot, I entered the wrong bug number in bodhi, but here's a link to the new package: aumix-2.8-21.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/aumix-2.8-21.fc12 I checked it with LANG set to ru_RU.UTF-8 and zh_CN.UTF-8, and they both seem to work now. (In reply to comment #13) > Shoot, I entered the wrong bug number in bodhi, but here's a link to the new > package: You can edit update, I guess. > aumix-2.8-21.fc12 has been submitted as an update for Fedora 12. > http://admin.fedoraproject.org/updates/aumix-2.8-21.fc12 > > I checked it with LANG set to ru_RU.UTF-8 and zh_CN.UTF-8, and they both seem > to work now. Yeah, it fixes this for me too. |