You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Christophe Lombart <ch...@gmail.com> on 2009/10/13 10:14:46 UTC

Encoding issue

Hi all,

We are using the default post servlet and we have some encoding issues
with french words ( with accents). We have se the encoding in our
application server and the terriroty attribute in Derby. Do I have to
change something in Jackrabbit or Sling ?

Thanks,
Christophe

Re: Encoding issue

Posted by Christophe Lombart <ch...@gmail.com>.
It works with the head. We are using a too old Sling version here ...
it is time to migrate.

Sorry for the noise and thanks to Bertrand for the  answers.

Christophe



---------- Forwarded message ----------
From: Bertrand Delacretaz <bd...@apache.org>
Date: 2009/10/13
Subject: Re: Encoding issue
To: users@sling.apache.org


On Tue, Oct 13, 2009 at 12:05 PM, Christophe Lombart
<ch...@gmail.com> wrote:
> ...We made the following curl command :
>
> curl  ...  -Fprop=été  -F_charset_=ISO-8859-1
> http://localhost:7001/doc-engine/encode2 (doc-engine is my sling app)
>
> and it is not working....

Not sure how curl handles encoding in such a case, I would try with a
browser first, unless you know more about curl.

See also http://markmail.org/message/ui7yn6bbstqamtom which might give
useful pointers.

> ...I'm doing from the browser :
> http://localhost:7001/doc-engine/encode2.html or
> http://localhost:7001/doc-engine/content/encode.html?_charset_=ISO-8859-1.
> The value of prop is not good....

Not sure either how that compares with posting an actual form, as the
AFAIK browser takes into account the charset used to send the form.

> ...FYI, we have set the Derby territory parameter to fr_FR. Not sure if
> Derby requires more setting for the encoding....

Don't know about that one either (hey I don't know much ;-), to rule
that out I would debug the SlingPostServlet to verify that parameters
are correctly decoded into Java strings.

-Bertrand

Re: Encoding issue

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Oct 13, 2009 at 12:05 PM, Christophe Lombart
<ch...@gmail.com> wrote:
> ...We made the following curl command :
>
> curl  ...  -Fprop=été  -F_charset_=ISO-8859-1
> http://localhost:7001/doc-engine/encode2 (doc-engine is my sling app)
>
> and it is not working....

Not sure how curl handles encoding in such a case, I would try with a
browser first, unless you know more about curl.

See also http://markmail.org/message/ui7yn6bbstqamtom which might give
useful pointers.

> ...I'm doing from the browser :
> http://localhost:7001/doc-engine/encode2.html or
> http://localhost:7001/doc-engine/content/encode.html?_charset_=ISO-8859-1.
> The value of prop is not good....

Not sure either how that compares with posting an actual form, as the
AFAIK browser takes into account the charset used to send the form.

> ...FYI, we have set the Derby territory parameter to fr_FR. Not sure if
> Derby requires more setting for the encoding....

Don't know about that one either (hey I don't know much ;-), to rule
that out I would debug the SlingPostServlet to verify that parameters
are correctly decoded into Java strings.

-Bertrand

Re: Encoding issue

Posted by Christophe Lombart <ch...@gmail.com>.
Salut Bernard,

We made the following curl command :

curl  ...  -Fprop=été  -F_charset_=ISO-8859-1
http://localhost:7001/doc-engine/encode2 (doc-engine is my sling app)

and it is not working.

I'm doing from the browser :
http://localhost:7001/doc-engine/encode2.html or
http://localhost:7001/doc-engine/content/encode.html?_charset_=ISO-8859-1.
The value of prop is not good.

FYI, we have set the Derby territory parameter to fr_FR. Not sure if
Derby requires more setting for the encoding.

I don't know where the problem comes from.

br,
Christophe



2009/10/13 Bertrand Delacretaz <bd...@apache.org>:
> Salut Christophe,
>
> On Tue, Oct 13, 2009 at 10:14 AM, Christophe Lombart
> <ch...@gmail.com> wrote:
>> ...We are using the default post servlet and we have some encoding issues
>> with french words ( with accents). We have se the encoding in our
>> application server and the terriroty attribute in Derby. Do I have to
>> change something in Jackrabbit or Sling ?...
>
> Does the "character encoding" paragraph at
> http://sling.apache.org/site/request-parameters.html help?
>
> If yes we might need to add a FAQ entry pointing to that.
>
> -Bertrand
>

Re: Encoding issue

Posted by Bertrand Delacretaz <bd...@apache.org>.
Salut Christophe,

On Tue, Oct 13, 2009 at 10:14 AM, Christophe Lombart
<ch...@gmail.com> wrote:
> ...We are using the default post servlet and we have some encoding issues
> with french words ( with accents). We have se the encoding in our
> application server and the terriroty attribute in Derby. Do I have to
> change something in Jackrabbit or Sling ?...

Does the "character encoding" paragraph at
http://sling.apache.org/site/request-parameters.html help?

If yes we might need to add a FAQ entry pointing to that.

-Bertrand