Are you saying that by only setting the content type, it should've  
also set the page encoding? For sure, that wasn't happening.

Also, I'm trying to set the page encoding via the web.xml, with this:

        <jsp-config>
                <jsp-property-group>
                        <url-pattern>*.jsp</url-pattern>
                        <page-encoding>UTF-8</page-encoding>
                        <!-- 
include-prelude>/WEB-INF/jsp/include.inc</include-prelude -->
                </jsp-property-group>
        </jsp-config>


But so far it's not working. Still troubleshooting, though (might just  
need to restart resin).

On Jul 29, 2009, at 14:41:20, Scott Ferguson wrote:

> The charset in the contentType is the default value of the
> pageEncoding.  So it shouldn't matter.
>
> You can check the parsing, by the way, by looking at the generated
> *.java file.  Those characters will be the parsed unicode values.
>
> -- Scott
>
>
> On Jul 29, 2009, at 2:27 PM, Rick Mann wrote:
>
>> Gah! Thank you! I feel like I should've known this, or did know it
>> once upon a time and just forgot.
>>
>> On Jul 29, 2009, at 14:23:03, Knut Forkalsrud wrote:
>>
>>> Try adding either of these:
>>>
>>> <%@ page pageEncoding="ISO-8859-1" %>
>>> <%@ page pageEncoding="UTF-8" %>
>>>
>>> One of them might do the trick
>>>
>>> -Knut
>>>
>>>
>>>
>>> <%@ page
>>> [ language="java" ]
>>> [ extends="package.class" ]
>>> [ import="{package.class | package.*}, ..." ]
>>> [ session="true|false" ]
>>> [ buffer="none|8kb|sizekb" ]
>>> [ autoFlush="true|false" ]
>>> [ isThreadSafe="true|false" ]
>>> [ info="text" ]
>>> [ errorPage="relativeURL" ]
>>> [ contentType="mimeType [ ; charset=characterSet ]" |
>>> "text/html ; charset=ISO-8859-1" ]
>>> [ isErrorPage="true|false" ]
>>> [ pageEncoding="characterSet |ISO-8859-1" ]
>>> %>
>>>
>>>
>>> On Wed, Jul 29, 2009 at 14:06, Rick Mann <rm...@latencyzero.com>
>>> wrote:
>>> So, I created two dirt-simple files, identical in content, one  
>>> ending
>>> in .jsp, one ending in .html. I have no filters or other processing
>>> in
>>> my webapp. Resin 4.0 seems to re-encode the UTF-8 copyright symbol,
>>> and I get four bytes "C3 82 C2 A9", when I should have two: "C2 A9",
>>> but ony in the .jsp, not in the .html.
>>>
>>> I figure at some point a conversion is happening where something is
>>> having the wrong encoding applied.
>>>
>>> Any suggestions?
>>>
>>>
>>> On Jul 28, 2009, at 18:19:24, Rick Mann wrote:
>>>
>>>> I'm running Resin 4.0 on Mac OS X. I have a .jsp file encoded as
>>>> UTF-8, and I pass -Dfile.encoding=utf-8 to the jvm. At the top of  
>>>> my
>>>> JSPs, I have
>>>>
>>>> <%@ page contentType="application/xhtml+xml; charset=UTF-8"%>
>>>>
>>>> I've verified that the JSP thinks the request and response  
>>>> encodings
>>>> are UTF-8 with:
>>>>
>>>> <%
>>>>
>>> org.apache.log4j.Logger.getLogger("com.latencyzero").warn("Encoding:
>>>> "+ request.getCharacterEncoding());
>>>>
>>> org.apache.log4j.Logger.getLogger("com.latencyzero").warn("resp
>>>> Encoding: "+ response.getCharacterEncoding());
>>>> %>
>>>>
>>>> But, the copyright symbol in my source file, which looks fine in my
>>>> UTF-8 aware text editor, renders as a capital A with a grave  
>>>> accent,
>>>> and the copyright symbol.
>>>>
>>>> What aspect of the encoding am I forgetting?
>>>>
>>>> TIA,
>>>> Rick
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> resin-interest mailing list
>>>> resin-interest@caucho.com
>>>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>>
>>>
>>>
>>> _______________________________________________
>>> resin-interest mailing list
>>> resin-interest@caucho.com
>>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>>
>>> _______________________________________________
>>> resin-interest mailing list
>>> resin-interest@caucho.com
>>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>
>>
>>
>> _______________________________________________
>> resin-interest mailing list
>> resin-interest@caucho.com
>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to