Rosetta export fails because of graphical newline (u'\u21b5') character

Bug #2897 reported by Christian Reis
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Carlos Perelló Marín

Bug Description

The rosetta export sometimes fails because a graphical newline (u'\u21b5') character is encountered in the translation content. This is a case similar to the dot character we use to indicate spaces; it needs to be transparently converted when saving the translation.

Of course, this only fails for pofiles in encodings that don't offer that character; even so, it should be fixed throughout.

  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poexport.py", line 67, in export_string
    chunks.extend([msgset.export_string() for msgset in msgsets])
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poexport.py", line 155, in export_string
    return unicode(message).encode(self.pofile.header.charset)
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u21b5' in position 171: ordinal not in range(256)

Changed in rosetta:
assignee: nobody → carlos
Changed in rosetta:
status: New → Accepted
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.