Copy and paste UTF-8 Causes Error

Bug #1271302 reported by Martin Owens
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

I copied a tick mark from inkscape and pasted into libreoffice, I got this error in inkscape:

Traceback (most recent call last):
  File "ink2canvas.py", line 89, in <module>
    ink.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 246, in affect
    if output: self.output()
  File "ink2canvas.py", line 34, in output
    sys.stdout.write(self.canvas.output())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2713' in position 327: ordinal not in range(128)

jazzynico (jazzynico)
tags: added: clipboard encoding
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Crunchbang Waldorf, Inkscape trunk revision 12969.
With 0.48.3.1, pasting writes the SVG code of the copied object instead of the object itself.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Related: bug #1258473 'trunk: ink2canvas for stroked objects fails with "AttributeError: 'module' object has no attribute 'unittouu'" '

Revision history for this message
jazzynico (jazzynico) wrote :

After playing with a rectangle (removing stroke, changing style, adding stroke), I no longer see the error message from the original description but, when the copied object is stroked, the error message from bug #1258473.
If I remove the stroke. the rectangle pastes in LibreOffice (I see the selection bounding box) but is empty (no fill, no stroke).

Revision history for this message
jazzynico (jazzynico) wrote :

Can't reproduce on Windows 7, even with old Inkscape versions (tested with 0.48.3.1 and 0.48.5). Gnu/Linux only?

Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Xubuntu 15.10, Inkscape 0.91 and trunk rev. 14772.
@Martin, could you please confirm it's fixed. If not, could you please attach an example file?

Revision history for this message
Przemysław Adam Śmiejek (przemyslaw-smiejek) wrote :

I have the same error on Inkscape 0.92.3 (2405546, 2018-03-11) system Kubuntu Cosmic

Example SVG is in attachment

Ctrl+C and…

Traceback (most recent call last):
  File "ink2canvas.py", line 91, in <module>
    ink.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 285, in affect
    self.output()
  File "ink2canvas.py", line 34, in output
    sys.stdout.write(self.canvas.output())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0105' in position 410: ordinal not in range(128)

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.