[ 
https://issues.apache.org/jira/browse/JSPWIKI-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556241#comment-13556241
 ] 

Jürgen Weber commented on JSPWIKI-396:
--------------------------------------

OK, this is quite subtle. Weblogic relies on that the wrapping 
ServletOutputStream is an OutputStream, i.e. backed by a byte[]. For u umlaut 
(Unicode C3 BC) Weblogic strangely sends   
-61  FFFFFFFFFFFFFFC3 
-68  FFFFFFFFFFFFFFBC
In byte[] this ends as C3 BC, new String(C3 BC) correctly gives u umlaut.
But currently WikiJSPFilter uses a CharArrayWriter, which uses char[] and 
stores u umlaut as FFC3, FFBC.char[].toString() yields the strange characters 
one sees. For Tomcat this seems to work by chance, probably the ServletFilter 
returns C3 BC as two chars which the browser combines into the unicode char.

U+00FC  ü       c3 bc   u umlaut

Actually, I don't see the need for WikiJSPFilter, it just caches, and caching 
should be left to the appserver. 

Anyway, the appended patch fixes the Weblogic problem and does not break Tomcat.


                
> UTF-8 characters in wiki pages incorrectly rendered if served by Weblogic 
> --------------------------------------------------------------------------
>
>                 Key: JSPWIKI-396
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-396
>             Project: JSPWiki
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Jürgen Weber
>            Assignee: Glen Mazza
>            Priority: Minor
>         Attachments: .jpg, .jpg, main_de.png, screenshot-1.jpg
>
>
> The Germain Main.txt starts with Herzlichen Glückwunsch.
> If the page is served by Weblogic Server, the umlaut is rendered with FFC3 
> and FFBC in Boxes, both with Firefox and IE. Served by Geronimo, it's fine.
> Herzlichen Glᅢᄐckwunsch
> Firefox page info says, page encoding is UTF-8.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to