Mojibake of localized help text in qrun

Bug #963542 reported by IWATA Hidetaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
High
Alexander Belchenko

Bug Description

When help text is localized, qrun window cannot show it correctly (at least in Windows. I've not checked other platform).

Bazaar (bzr) 2.5.1dev
  Python interpreter: C:\DEVELOP\py_envs\bzr2.5-mingw\Scripts\python.exe 2.7.2
  Python standard library: C:\DEVELOP\py_envs\bzr2.5-mingw\lib
  Platform: Windows-7-6.1.7601-SP1

Tags: qrun i18n

Related branches

description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

With bzr 2.5.0-2 standalone installer I can see localization and this bug. Therefore I should be able to fix it.

Changed in qbzr:
status: New → Confirmed
importance: Undecided → High
tags: added: i18n
tags: added: qrun
summary: - [qrun][i18n] Mojibake of help text
+ [qrun][i18n] Mojibake of localized help text in qrun
summary: - [qrun][i18n] Mojibake of localized help text in qrun
+ Mojibake of localized help text in qrun
Revision history for this message
Alexander Belchenko (bialix) wrote :

Screenshot.

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, the problem seems to be with Qt/PyQt. The code in question is inside qbzr/lib/run.py, method set_cmd_help lines 242-256.
Specifically this line:

self.ui.help_browser.setHtml(
                get_help_topic_as_html("commands/" + cmd_name))

Function get_help_topic_as_html returns as utf-8 encoded html as string, and we pass this string into QTextBrowser object. I suspect Qt expect unicode from us.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Yep, unicode was expected by Qt.

Changed in qbzr:
status: Confirmed → In Progress
assignee: nobody → Alexander Belchenko (bialix)
milestone: none → 0.22.2
Changed in qbzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.