hp-scan fails in directory which contains unicode chars

Bug #1061099 reported by Daniel Pielmeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Gentoo Linux
Fix Released
Medium

Bug Description

when executed in a directory which contains unicode chars, hp-scan fails with

Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 768, in <module>
    log.warn("Defaulting to '%s'." % output)
  File "/usr/share/hplip/base/logger.py", line 295, in warn
    txt = "warning: %s" % message.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 60: ordinal not in range(128)

Revision history for this message
In , ArneBab (arne-bab) wrote :

when executed in a directory which contains unicode chars, hp-scan fails with

Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 768, in <module>
    log.warn("Defaulting to '%s'." % output)
  File "/usr/share/hplip/base/logger.py", line 295, in warn
    txt = "warning: %s" % message.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 60: ordinal not in range(128)

I’ll attach a fix.

Revision history for this message
In , ArneBab (arne-bab) wrote :

Created attachment 325476
fix-unicode.diff

Fix Unicode Error when in dir containing unicode chars.

Revision history for this message
In , ArneBab (arne-bab) wrote :

Importance High, because this actually makes the program crash.

Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :
Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

+*hplip-3.12.9-r2 (03 Oct 2012)
+
+ 03 Oct 2012; Daniel Pielmeier <email address hidden> +hplip-3.12.9-r2.ebuild:
+ Fix bug #436794 - hp-scan fails in directories containing unicode characters.
+ Thanks to Arne Babenhauserheide for the report and the patch.

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :

Is there any chance this bug gets fixed?

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.