Saving page name with accented character?

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

Saving page name with accented character?

Julio
I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
Postgres, but every time than I save a page with accent in the name, XWiki
change the name. For example, I try to save a page with the name "é" and
XWiki save "%25C3%25A9" Please, why this happens?



*My settings in windows:*

*tomcat\conf\server.xml:*

    <Connector port="8080" protocol="HTTP/1.1"
  URIEncoding="UTF-8"

*xwiki.cfg:*

xwiki.encoding=UTF-8

*PostgreSQL:*

CREATE DATABASE wiki
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'Portuguese_Brazil.1252'
       LC_CTYPE = 'Portuguese_Brazil.1252'
       CONNECTION LIMIT = -1;

Thanks,
Julio
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Paul Libbrecht-2
Julio,

the two are equivalent as per the URL spec, I believe.

paul  

> Julio Brum <mailto:[hidden email]>
> 24 June 2016 at 00:38
> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> Postgres, but every time than I save a page with accent in the name, XWiki
> change the name. For example, I try to save a page with the name "é" and
> XWiki save "%25C3%25A9" Please, why this happens?
>
>
>
> *My settings in windows:*
>
> *tomcat\conf\server.xml:*
>
> <Connector port="8080" protocol="HTTP/1.1"
> URIEncoding="UTF-8"
>
> *xwiki.cfg:*
>
> xwiki.encoding=UTF-8
>
> *PostgreSQL:*
>
> CREATE DATABASE wiki
> WITH OWNER = postgres
> ENCODING = 'UTF8'
> TABLESPACE = pg_default
> LC_COLLATE = 'Portuguese_Brazil.1252'
> LC_CTYPE = 'Portuguese_Brazil.1252'
> CONNECTION LIMIT = -1;
>
> Thanks,
> Julio
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs

_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Clemens Klein-Robbenhaar
In reply to this post by Julio
The config looks ok, as far as I can see from the snippets.
(though I thought one could/should use UTF8 for LC_CTYPE / LC_COLLATE, too, but then I am no postgres expert;
in any case I do not think the DB level does matter here.)

It looks like the URL gets encoded twice somewhere.

Is there anything else in front of tomcat, or do you access the server directly on port 8080 ?

Clemens


From: Julio Brum
On:  Friday, 24.06.2016, 00:38

> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> Postgres, but every time than I save a page with accent in the name, XWiki
> change the name. For example, I try to save a page with the name "é" and
> XWiki save "%25C3%25A9" Please, why this happens?
>
>
>
> *My settings in windows:*
>
> *tomcat\conf\server.xml:*
>
>     <Connector port="8080" protocol="HTTP/1.1"
>   URIEncoding="UTF-8"
>
> *xwiki.cfg:*
>
> xwiki.encoding=UTF-8
>
> *PostgreSQL:*
>
> CREATE DATABASE wiki
>   WITH OWNER = postgres
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        LC_COLLATE = 'Portuguese_Brazil.1252'
>        LC_CTYPE = 'Portuguese_Brazil.1252'
>        CONNECTION LIMIT = -1;
>
> Thanks,
> Julio
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Denis Gervalle-2
In reply to this post by Julio
Hi Julio,

Don't you have an apache front end ?
If so, you need to check that you are not using URL rewriting that cause
double encoding of the URL parameters.
Hope this helps,


On Fri, Jun 24, 2016 at 12:38 AM, Julio Brum <[hidden email]> wrote:

> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> Postgres, but every time than I save a page with accent in the name, XWiki
> change the name. For example, I try to save a page with the name "é" and
> XWiki save "%25C3%25A9" Please, why this happens?
>
>
>
> *My settings in windows:*
>
> *tomcat\conf\server.xml:*
>
>     <Connector port="8080" protocol="HTTP/1.1"
>   URIEncoding="UTF-8"
>
> *xwiki.cfg:*
>
> xwiki.encoding=UTF-8
>
> *PostgreSQL:*
>
> CREATE DATABASE wiki
>   WITH OWNER = postgres
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        LC_COLLATE = 'Portuguese_Brazil.1252'
>        LC_CTYPE = 'Portuguese_Brazil.1252'
>        CONNECTION LIMIT = -1;
>
> Thanks,
> Julio
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>



--
Denis Gervalle
SOFTEC sa - CEO
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Julio
In reply to this post by Clemens Klein-Robbenhaar
Clemens,
I access directly: http://localhost:8080/

thanks

2016-06-24 5:03 GMT-03:00 Clemens Klein-Robbenhaar <
[hidden email]>:

> The config looks ok, as far as I can see from the snippets.
> (though I thought one could/should use UTF8 for LC_CTYPE / LC_COLLATE,
> too, but then I am no postgres expert;
> in any case I do not think the DB level does matter here.)
>
> It looks like the URL gets encoded twice somewhere.
>
> Is there anything else in front of tomcat, or do you access the server
> directly on port 8080 ?
>
> Clemens
>
>
> From: Julio Brum
> On:  Friday, 24.06.2016, 00:38
> > I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> > Postgres, but every time than I save a page with accent in the name,
> XWiki
> > change the name. For example, I try to save a page with the name "é" and
> > XWiki save "%25C3%25A9" Please, why this happens?
> >
> >
> >
> > *My settings in windows:*
> >
> > *tomcat\conf\server.xml:*
> >
> >     <Connector port="8080" protocol="HTTP/1.1"
> >   URIEncoding="UTF-8"
> >
> > *xwiki.cfg:*
> >
> > xwiki.encoding=UTF-8
> >
> > *PostgreSQL:*
> >
> > CREATE DATABASE wiki
> >   WITH OWNER = postgres
> >        ENCODING = 'UTF8'
> >        TABLESPACE = pg_default
> >        LC_COLLATE = 'Portuguese_Brazil.1252'
> >        LC_CTYPE = 'Portuguese_Brazil.1252'
> >        CONNECTION LIMIT = -1;
> >
> > Thanks,
> > Julio
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Julio
In reply to this post by Denis Gervalle-2
Hi Denis,


Clemens,
I access directly, without apache front end, only tomcat:
http://localhost:8080/


When I created a page with the name "é" the wiki created the name %25C3%25A9
http://localhost:8080/xwikibdold/bin/view/2014/%25C3%25A9


When I edit the page %25C3%25A9, a wiki created the name %2525C3%2525A9
http://localhost:8080/xwikibdold/bin/view/2014/%2525C3%2525A9


When I edit the page %252525C3%252525A9, a wiki created the
name %25252525C3%25252525A9
http://localhost:8080/xwikibdold/bin/view/2014/%25252525C3%25252525A9


That is, I can not change never a page with accents or %, because wiki
always creates another.



thanks

2016-06-24 6:11 GMT-03:00 Denis Gervalle <[hidden email]>:

> Hi Julio,
>
> Don't you have an apache front end ?
> If so, you need to check that you are not using URL rewriting that cause
> double encoding of the URL parameters.
> Hope this helps,
>
>
> On Fri, Jun 24, 2016 at 12:38 AM, Julio Brum <[hidden email]> wrote:
>
> > I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> > Postgres, but every time than I save a page with accent in the name,
> XWiki
> > change the name. For example, I try to save a page with the name "é" and
> > XWiki save "%25C3%25A9" Please, why this happens?
> >
> >
> >
> > *My settings in windows:*
> >
> > *tomcat\conf\server.xml:*
> >
> >     <Connector port="8080" protocol="HTTP/1.1"
> >   URIEncoding="UTF-8"
> >
> > *xwiki.cfg:*
> >
> > xwiki.encoding=UTF-8
> >
> > *PostgreSQL:*
> >
> > CREATE DATABASE wiki
> >   WITH OWNER = postgres
> >        ENCODING = 'UTF8'
> >        TABLESPACE = pg_default
> >        LC_COLLATE = 'Portuguese_Brazil.1252'
> >        LC_CTYPE = 'Portuguese_Brazil.1252'
> >        CONNECTION LIMIT = -1;
> >
> > Thanks,
> > Julio
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
>
> --
> Denis Gervalle
> SOFTEC sa - CEO
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Sergiu Dumitriu-3
In reply to this post by Julio
What is the operating system encoding? Try putting this in a new wiki
page and view it:

{{groovy}}
print System.getProperty('file.encoding')
{{/groovy}}

On 06/23/2016 06:38 PM, Julio Brum wrote:

> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> Postgres, but every time than I save a page with accent in the name, XWiki
> change the name. For example, I try to save a page with the name "é" and
> XWiki save "%25C3%25A9" Please, why this happens?
>
>
>
> *My settings in windows:*
>
> *tomcat\conf\server.xml:*
>
>     <Connector port="8080" protocol="HTTP/1.1"
>   URIEncoding="UTF-8"
>
> *xwiki.cfg:*
>
> xwiki.encoding=UTF-8
>
> *PostgreSQL:*
>
> CREATE DATABASE wiki
>   WITH OWNER = postgres
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        LC_COLLATE = 'Portuguese_Brazil.1252'
>        LC_CTYPE = 'Portuguese_Brazil.1252'
>        CONNECTION LIMIT = -1;
>
> Thanks,
> Julio

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Julio
Sergiu,

the operating system encoding is "Cp1252". Is this the problem?

Cordialment,
Julio

2016-06-25 9:51 GMT-03:00 Sergiu Dumitriu <[hidden email]>:

> What is the operating system encoding? Try putting this in a new wiki
> page and view it:
>
> {{groovy}}
> print System.getProperty('file.encoding')
> {{/groovy}}
>
> On 06/23/2016 06:38 PM, Julio Brum wrote:
> > I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> > Postgres, but every time than I save a page with accent in the name,
> XWiki
> > change the name. For example, I try to save a page with the name "é" and
> > XWiki save "%25C3%25A9" Please, why this happens?
> >
> >
> >
> > *My settings in windows:*
> >
> > *tomcat\conf\server.xml:*
> >
> >     <Connector port="8080" protocol="HTTP/1.1"
> >   URIEncoding="UTF-8"
> >
> > *xwiki.cfg:*
> >
> > xwiki.encoding=UTF-8
> >
> > *PostgreSQL:*
> >
> > CREATE DATABASE wiki
> >   WITH OWNER = postgres
> >        ENCODING = 'UTF8'
> >        TABLESPACE = pg_default
> >        LC_COLLATE = 'Portuguese_Brazil.1252'
> >        LC_CTYPE = 'Portuguese_Brazil.1252'
> >        CONNECTION LIMIT = -1;
> >
> > Thanks,
> > Julio
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Sergiu Dumitriu-3
It may be. Can you configure the tomcat start script to also pass this
option to the java command:

-Dfile.encoding=utf-8

I'm not sure how to do that on Windows, maybe this can help:

http://stackoverflow.com/a/11343571/620249

On 06/27/2016 11:54 AM, Julio Brum wrote:

> Sergiu,
>
> the operating system encoding is "Cp1252". Is this the problem?
>
> Cordialment,
> Julio
>
> 2016-06-25 9:51 GMT-03:00 Sergiu Dumitriu <[hidden email]>:
>
>> What is the operating system encoding? Try putting this in a new wiki
>> page and view it:
>>
>> {{groovy}}
>> print System.getProperty('file.encoding')
>> {{/groovy}}
>>
>> On 06/23/2016 06:38 PM, Julio Brum wrote:
>>> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
>>> Postgres, but every time than I save a page with accent in the name,
>> XWiki
>>> change the name. For example, I try to save a page with the name "é" and
>>> XWiki save "%25C3%25A9" Please, why this happens?
>>>
>>>
>>>
>>> *My settings in windows:*
>>>
>>> *tomcat\conf\server.xml:*
>>>
>>>     <Connector port="8080" protocol="HTTP/1.1"
>>>   URIEncoding="UTF-8"
>>>
>>> *xwiki.cfg:*
>>>
>>> xwiki.encoding=UTF-8
>>>
>>> *PostgreSQL:*
>>>
>>> CREATE DATABASE wiki
>>>   WITH OWNER = postgres
>>>        ENCODING = 'UTF8'
>>>        TABLESPACE = pg_default
>>>        LC_COLLATE = 'Portuguese_Brazil.1252'
>>>        LC_CTYPE = 'Portuguese_Brazil.1252'
>>>        CONNECTION LIMIT = -1;
>>>
>>> Thanks,
>>> Julio
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
>> _______________________________________________
>> devs mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Julio
Sergiu, thanks for the suggestion. I changed the "-Dfile.encoding" value to
"UTF-8", but the problem continues.

I think the only solution is to install XWiki on a Linux machine ...

Cordialment,
Julio

2016-06-27 13:17 GMT-03:00 Sergiu Dumitriu <[hidden email]>:

> It may be. Can you configure the tomcat start script to also pass this
> option to the java command:
>
> -Dfile.encoding=utf-8
>
> I'm not sure how to do that on Windows, maybe this can help:
>
> http://stackoverflow.com/a/11343571/620249
>
> On 06/27/2016 11:54 AM, Julio Brum wrote:
> > Sergiu,
> >
> > the operating system encoding is "Cp1252". Is this the problem?
> >
> > Cordialment,
> > Julio
> >
> > 2016-06-25 9:51 GMT-03:00 Sergiu Dumitriu <[hidden email]>:
> >
> >> What is the operating system encoding? Try putting this in a new wiki
> >> page and view it:
> >>
> >> {{groovy}}
> >> print System.getProperty('file.encoding')
> >> {{/groovy}}
> >>
> >> On 06/23/2016 06:38 PM, Julio Brum wrote:
> >>> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
> >>> Postgres, but every time than I save a page with accent in the name,
> >> XWiki
> >>> change the name. For example, I try to save a page with the name "é"
> and
> >>> XWiki save "%25C3%25A9" Please, why this happens?
> >>>
> >>>
> >>>
> >>> *My settings in windows:*
> >>>
> >>> *tomcat\conf\server.xml:*
> >>>
> >>>     <Connector port="8080" protocol="HTTP/1.1"
> >>>   URIEncoding="UTF-8"
> >>>
> >>> *xwiki.cfg:*
> >>>
> >>> xwiki.encoding=UTF-8
> >>>
> >>> *PostgreSQL:*
> >>>
> >>> CREATE DATABASE wiki
> >>>   WITH OWNER = postgres
> >>>        ENCODING = 'UTF8'
> >>>        TABLESPACE = pg_default
> >>>        LC_COLLATE = 'Portuguese_Brazil.1252'
> >>>        LC_CTYPE = 'Portuguese_Brazil.1252'
> >>>        CONNECTION LIMIT = -1;
> >>>
> >>> Thanks,
> >>> Julio
> >>
> >> --
> >> Sergiu Dumitriu
> >> http://purl.org/net/sergiu/
> >> _______________________________________________
> >> devs mailing list
> >> [hidden email]
> >> http://lists.xwiki.org/mailman/listinfo/devs
> >>
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Saving page name with accented character?

Julio
Hi,

Perhaps that is the cause of my problem was happening:

http://jira.xwiki.org/browse/XWIKI-13556

Regards,
Julio

2016-06-27 16:46 GMT-03:00 Julio Brum <[hidden email]>:

> Sergiu, thanks for the suggestion. I changed the "-Dfile.encoding" value
> to "UTF-8", but the problem continues.
>
> I think the only solution is to install XWiki on a Linux machine ...
>
> Cordialment,
> Julio
>
> 2016-06-27 13:17 GMT-03:00 Sergiu Dumitriu <[hidden email]>:
>
>> It may be. Can you configure the tomcat start script to also pass this
>> option to the java command:
>>
>> -Dfile.encoding=utf-8
>>
>> I'm not sure how to do that on Windows, maybe this can help:
>>
>> http://stackoverflow.com/a/11343571/620249
>>
>> On 06/27/2016 11:54 AM, Julio Brum wrote:
>> > Sergiu,
>> >
>> > the operating system encoding is "Cp1252". Is this the problem?
>> >
>> > Cordialment,
>> > Julio
>> >
>> > 2016-06-25 9:51 GMT-03:00 Sergiu Dumitriu <[hidden email]>:
>> >
>> >> What is the operating system encoding? Try putting this in a new wiki
>> >> page and view it:
>> >>
>> >> {{groovy}}
>> >> print System.getProperty('file.encoding')
>> >> {{/groovy}}
>> >>
>> >> On 06/23/2016 06:38 PM, Julio Brum wrote:
>> >>> I am using the XWiki version 7.4.1 with UTF-8 in Xwiki, tomcat8 and
>> >>> Postgres, but every time than I save a page with accent in the name,
>> >> XWiki
>> >>> change the name. For example, I try to save a page with the name "é"
>> and
>> >>> XWiki save "%25C3%25A9" Please, why this happens?
>> >>>
>> >>>
>> >>>
>> >>> *My settings in windows:*
>> >>>
>> >>> *tomcat\conf\server.xml:*
>> >>>
>> >>>     <Connector port="8080" protocol="HTTP/1.1"
>> >>>   URIEncoding="UTF-8"
>> >>>
>> >>> *xwiki.cfg:*
>> >>>
>> >>> xwiki.encoding=UTF-8
>> >>>
>> >>> *PostgreSQL:*
>> >>>
>> >>> CREATE DATABASE wiki
>> >>>   WITH OWNER = postgres
>> >>>        ENCODING = 'UTF8'
>> >>>        TABLESPACE = pg_default
>> >>>        LC_COLLATE = 'Portuguese_Brazil.1252'
>> >>>        LC_CTYPE = 'Portuguese_Brazil.1252'
>> >>>        CONNECTION LIMIT = -1;
>> >>>
>> >>> Thanks,
>> >>> Julio
>> >>
>> >> --
>> >> Sergiu Dumitriu
>> >> http://purl.org/net/sergiu/
>> >> _______________________________________________
>> >> devs mailing list
>> >> [hidden email]
>> >> http://lists.xwiki.org/mailman/listinfo/devs
>> >>
>> > _______________________________________________
>> > devs mailing list
>> > [hidden email]
>> > http://lists.xwiki.org/mailman/listinfo/devs
>> >
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
>> _______________________________________________
>> devs mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs