Il 02.03.2015 17.18, Brett Ryan ha scritto:
Actually its not tomcats issue, when sending an encoding other than the default 
which is ISO-8859-1 according to RFC-2616 (HTTP/1.1) you should send the 
encoding type (i.e. text/xml;charset=utf-8). By default the JAXB marshaller 
will use UTF-8 encoding when marshalling.

You can switch Tomcat to use UTF-8 encoding everywhere by default by setting 
the URI encoding, adding an encoding filter such as [1](Springs 
CharacterEncodingFilter) implementation etc... follow details at [2](the tomcat 
wiki).

What I'm guessing was happening was you were sending a character like a 
copyright symbol but instead of sending 0xA9 you were sending 0xC2 0xA9

[1]: 
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/filter/CharacterEncodingFilter.html
[2]: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

More or less you guessed well.
In fact inside the xml there was a special character (a fi greek letter), but what I found in wire log, this character had been converted in a string like "[0xd8]" as is (including brackets). So from my point of view, in that string there weren't spacial characters. Unless wire log make some kind of formatting to render the content.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to