Hi Jürg,

Juerg Meier schrieb:
Hi Felix,

I am working again CRX-quickstart 1.4.0, so that's Jetty based (you'd
know the exact version).

IIRC CRX-quickstart is not Jetty based but based on Day's own servlet container (known as Day Servlet Endine or CQSE).


I have not noticed differences among browsers. Firefox 1.5 (Linux) and
2.0 (win), IE 6 & 7 all behaved the same... both, in yielding wrong
results at first place, and correct ones after improving the POST
parameters.

No differences amongst browser behaviour is very good ;:-)

Will check into this. I know that we fixed a lot of such encoding issues shortly before release. But I am not sure, which of these fixes made it into the CRX-quickstart package.

So, it looks like it is really a server problem. Strange that Jetty
works in utf-8 mode by default. Judging by symptoms, looks like it runs
in ISO-mode.

I will try to see, what is going on here and report back. But this may take some time...

Regards
Felix


Regards,
Juerg


On Thu, 2008-08-21 at 08:56 +0200, Felix Meschberger wrote:
Hi Jürg,

Great that it works.

Just let me add that non-ASCII character support seems to be a really tough topic. As you write the best results may be obtained by using POST requests and with multipart/form-data because multipart/form-data parsing is controlled by Sling while parsing of url encoded form data is controlled by the servlet container. And here we have deviations between different containers -- for example Jetty uses UTF-8 by default while others use ISO-8859-1 (as the servlet spec seems to mandate); and we try to circumvent the Jetty issue with a hack.


If you could provide use with the browser name and version and the servlet container name and version you use when encountering the issue, we could record this situation to help out others in the future or to even find an appropriate solution.

Thanks.

Regards
Felix

Juerg Meier schrieb:
Hi Tobias,

_charset_ was good, though it did not do the job entirely.

I was pretty disappointed when I still had the klingon characters on my
screen... But I tried several things, among others setting the form's
enctype to multipart/form-data. Then, there were there... finally!

Thanks so much for the tip, Tobias!

Cheers,
Juerg




On Wed, 2008-08-20 at 02:05 +0200, Tobias Bocanegra wrote:
hi,
the FormEncoding parameter was renamed to _charset_  (see [0]):

so:
<input name="_charset_" type="hidden" value="UTF-8"/>

should do the trick.
regards, toby

[0] https://issues.apache.org/jira/browse/SLING-298

On 8/19/08, Juerg Meier <[EMAIL PROTECTED]> wrote:
Hi all,

 This problem is driving me nuts...

 I don't get UTF-8 Umlaute correctly into the JCR. I double-checked
 everything to ensure the page is *really* UTF-8, and lately I discovered
 the thing with the hidden "FormEncoding" parameter. But instead of
 getting a clean 'ü', I still get something like "ü" (two byte UFT-8),
 and additionally a string property named "FormEncoding" on that node...


 Here's the JSP:

 <?xml version="1.0" encoding="UTF-8" ?>
 <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <[EMAIL PROTECTED] import="javax.jcr.query.*, javax.jcr.*,
 org.apache.sling.api.resource.Resource"%>
 <[EMAIL PROTECTED] session="false"%>
 <[EMAIL PROTECTED] prefix="sling"
 uri="http://sling.apache.org/taglibs/sling/1.0"%>
 <sling:defineObjects/>


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 <html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title>Insert title here</title>
 </head>
 <body>

        <form name="form1" method="post" action="<%= currentNode.getPath()%>"
 >
        <table width="80%" border="0" cellspacing="4" cellpadding="4">
        <tr>
                <td>Titel:</td>
                <td><input name="title" type="text" id="title" size="80"
 maxlength="128" value="<%= currentNode.getProperty("title").getString()
 %>"></td>
        </tr>

        <tr>
                <td><input name="FormEncoding" type="hidden" value="UTF-8"/> 
</td>
                <td><input type="submit" value="Ändern"></td>
        </tr>
        </table>
        </form>

 </body>
 </html>


 Here what the browser sends:
  POSTDATA=title=Hilfe+bei+Wetterf%C3%BChligkeit&FormEncoding=UTF-8


 Any help is highly appreciated!

 Regards,

Juerg








Reply via email to