https://bugs.documentfoundation.org/show_bug.cgi?id=161938

Julien Nabet <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Julien Nabet <[email protected]> ---
The xml is parsed with expat lib which understands these encodings:
UTF-16 UTF-8 ISO-8859-1 US-ASCII UTF-16BE UTF-16LE
(see CMakeLists.txt that can be found in workdir/UnpackedTarball/expat).
workdir/UnpackedTarball/expat/doc/reference.html indicates:
There are four built-in encodings in Expat:

    UTF-8
    UTF-16
    ISO-8859-1
    US-ASCII

Anything else discovered in an encoding declaration or in the protocol encoding
specified in the parser constructor, triggers a call to the
UnknownEncodingHandler. This handler gets passed the encoding name and a
pointer to an XML_Encoding data structure. Your handler must fill in this
structure and return XML_STATUS_OK if it knows how to deal with the encoding.
Otherwise the handler should return XML_STATUS_ERROR. The handler also gets
passed a pointer to an optional application data structure that you may
indicate when you set the handler.

Svg specs indicates:
"A conforming SVG markup fragment is also a conforming XML-compatible SVG
markup"
(see https://www.w3.org/TR/SVG2/conform.html#ConformingSVGXMLFragments)

About encoding in XML, we can find info
https://www.w3.org/TR/xml/#charencoding.
It indicates some encodings like UTF-8 and UTF-16 but also talks about those
registered on IANA and "windows-1252" seems one of them.

At least 4 possibilites now:
1) put this bug at WONTFIX (since windows-1252 is accepted but not a real
standard for XML)

2) put this bug at NOTOURBUG (expat bug)

3) teach to expat how to deal with windows-1252 by adding XML_Encoding 
but does it worth it? I mean perhaps expat's devs have a good reason for not
having included it? And should we deal with any encodings which may be used in
svg then?

4) add a popup message indicating there's an encoding pb instead of an empty
image

My preference would be 2).

I'd be curious about the origin of the svg, has it been created with an old
app/lib?
I mean UTF-8 has been a standard encoding for a while now.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to