xcf export fails if file or layer names contain non-ASCII characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
jazzynico |
Bug Description
XCF export seems to fail when spaces or special non-US-ASCII characters are used for the name of layers or file.
My locale is spanish, where the use of accented vowels and ñ is very common, and that's what appears to keep the xcf export script from working correctly.
In 0.48.4 it just does nothing (it doesn't save anything and it doesn't show any error messages in the UI or the console).
In 0.48+devel an error message is displayed:
Traceback (most recent call last):
File "gimp_xcf.py", line 271, in <module>
e.affect()
File "/opt/inkscape-
self.effect()
File "gimp_xcf.py", line 235, in effect
f.write(
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 1351: ordinal not in range(128)
The workaround is very easy, it's only matter of changing the name of the offending elements removing all non-ascii characters, and the file is created properly.
Related branches
tags: | added: exporting layers xcf |
tags: | removed: layers |
description: | updated |
Changed in inkscape: | |
status: | Confirmed → Triaged |
assignee: | nobody → JazzyNico (jazzynico) |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Reproduced with Inkscape 0.48+devel r12415 on OS X 10.7.5, Python 2.7.5, GTK+/Quartz 2.24.19:
exporting of the provided sample SVG file to GIMP XCF (GIMP 2.8.6 installed) fails with this error message:
Traceback (most recent call last): magenta/ mp-trunk/ src/inkscape- repo/mptrunk- quartz/ inst/share/ inkscape/ extensions/ inkex.py" , line 267, in affect script_ fu)
File "gimp_xcf.py", line 271, in <module>
e.affect()
File "/Volumes/
self.effect()
File "gimp_xcf.py", line 235, in effect
f.write(
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0301' in position 1832: ordinal not in range(128)