Hi,
I'm trying to load an XML file (UTF-8 encoded) with web.xml and all my special characters are converted to "??"
any idea ?
Sample page here : http://developer.mindtouch.com/User:...mattingProblem
Tks
Vincent
Hi,
I'm trying to load an XML file (UTF-8 encoded) with web.xml and all my special characters are converted to "??"
any idea ?
Sample page here : http://developer.mindtouch.com/User:...mattingProblem
Tks
Vincent
Check the MIME type that is returned by the server from which you're trying to retrieve the resource from. If it's using text/xml, then web.xml will use ASCII as the charset (unless the MIME type include 'charset=utf-8'). Otherwise, if it uses application/xml, then it should work since that's by default interpreted as UTF-8.
Steve G. Bjorg - Chief Architect
Did you check the MindTouch FAQ?
Found a bug? Report it.
Follow me on Twitter
Find us on IRC: irc.freenode.net #mindtouch
Thanks Steve,
HTTP HEADERS:
It's text/xml BUT the xml heading specify the encoding as UTF-8...Code:Date: Thu, 14 Jan 2010 07:27:24 GMT Server: Apache-Coyote/1.1 Content-Type: text/xml Content-Length: 4736 Via: 1.1 ecatalog.dlpdomain.com
Any other idea ?Code:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> ...
The encoding in the XML declaration is useless since by the time it's read the byte stream has already been decoded using Encoding.ASCII instead of Encoding.UTF8. In the context of HTTP, the XML declaration is close to useless. The encoding is entirely managed by the MIME type. Note that if the MIME type had been "text/xml; charset=utf-8" then it would work fine as well.
There is fairly little that can be done when the server sends bad data.
Steve G. Bjorg - Chief Architect
Did you check the MindTouch FAQ?
Found a bug? Report it.
Follow me on Twitter
Find us on IRC: irc.freenode.net #mindtouch
Thanks Steve
I had filled a bug report, you can close it
http://bugs.developer.mindtouch.com/...hp?bug_id=7497