Ticket #60 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Character encoding problems with the 'description' attribute

Reported by: jerome Owned by: jerome
Priority: minor Milestone: 1.27 final
Component: pykota Version: development
Keywords: Cc:

Description (last modified by jerome) (diff)

pkusers --add --description "tététtétééé" toto
Création...
ERROR: PyKota v1.27alpha8_unofficial
ERROR: pkusers failed
ERROR: Traceback (most recent call last):
ERROR:   File "/usr/lib/python2.5/site-packages/pykota/utils.py", line 163, in run
ERROR:     retcode = application.main(arguments, options)
ERROR:   File "/usr/bin/pkusers", line 249, in main
ERROR:     useremail or options.email)
ERROR:   File "/usr/bin/pkusers", line 44, in modifyEntry
ERROR:     entry.setDescription(description)
ERROR:   File "/usr/lib/python2.5/site-packages/pykota/storage.py", line 44, in setDescription
ERROR:     self.Description = str(description)
ERROR: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

Change History

Changed 12 years ago by jerome

  • description modified (diff)

Changed 12 years ago by jerome

  • status changed from new to closed
  • resolution set to fixed

(In [3526]) Fixes #60.

Changed 12 years ago by jerome

(In [3532]) Backported changes from [3531] to LDAP. Fixes #56 for good. References #60.

Changed 12 years ago by jerome

(In [3533]) Fixes #61. References #56, #60.

Changed 12 years ago by jerome

(In [3541]) I've finally killed this one (exactly the sort of thing I've said for
several years wrt such charset encoding problems) ! The problem was not
in the encoding of the title attribute of the job, which was perfectly
correct, but in the jobid attribute, which was still in unicode instead
of in UTF-8. This particular situation made the query string be
transformed to unicode, and an utf-8 encoded title couldn't be inserted
into it, making PyKota fail miserably.
Fixes #56. References #60, #61.

Note: See TracTickets for help on using tickets.