Comment 3 for bug 872376

Revision history for this message
Carl Karsten (carlfk) wrote :

$ head pyconde.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"

- is the content (string) of the <title> tag (which the script seems to reuse as file name) properly UTF-8 encoded as well?
Don't know. I think not, but seems to be working anyway: inkscape renders the expected characters.

Here is the code that creates the <title>.svg:

open(cooked_svg_name,'w').write(cooked_svg)
https://github.com/CarlFK/veyepar/blob/master/dj/scripts/enc.py#L197
The value of cooked_svg_name can be traced back to a .json file.

I think what needs to be figured out is What is/isn't a valid file name?

According to #linux,
(11:20:44 AM) CarlFK: what are valid chars for ext3 fs file names?
(11:20:55 AM) amrit|SEA: anything but /
I searched for docs stating that, couldn't find anything either way.
http://e2fsprogs.sourceforge.net/ext2intro.html seemed like the obvious place to look.

assuming that is correct,
cp x.svg $'\xdf.svg' creates a valid file, and there should be some way for inkscape to open it.
Seems there is no way to pass it on the command line, or select it using the gui open file dialog.

Also from #linux:
(11:28:30 AM) amrit|SEA: CarlFK: from a quick google search, it appears it uses the boost library
(11:29:13 AM) amrit|SEA: CarlFK: if they're using the boost::fs, that lib is more restrictive than the base OS, in favor of cross platform compatibility
(11:29:31 AM) amrit|SEA: so that *could* be why they're claiming that's not a valid filename

If this is the case, then this is just a limitation we have to live with, should be documented, and no more time needs to be spent on the code.