Encoding issue

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding issue

Christophe Lombart
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

Reply | Threaded
Open this post in threaded view
|

Re: Encoding issue

Bertrand Delacretaz
Salut Christophe,

On Tue, Oct 13, 2009 at 10:14 AM, Christophe Lombart
<[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Encoding issue

Christophe Lombart
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 <[hidden email]>:

> Salut Christophe,
>
> On Tue, Oct 13, 2009 at 10:14 AM, Christophe Lombart
> <[hidden email]> 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
>

Reply | Threaded
Open this post in threaded view
|

Re: Encoding issue

Bertrand Delacretaz
On Tue, Oct 13, 2009 at 12:05 PM, Christophe Lombart
<[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Encoding issue

Christophe Lombart
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 <[hidden email]>
Date: 2009/10/13
Subject: Re: Encoding issue
To: [hidden email]


On Tue, Oct 13, 2009 at 12:05 PM, Christophe Lombart
<[hidden email]> 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