[xwiki-devs] Saving page name with accented character?
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
Julio, the two are equivalent as per the URL spec, I believe. paul
Julio Brum <mailto:[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Clemens, I access directly: http://localhost:8080/ thanks 2016-06-24 5:03 GMT-03:00 Clemens Klein-Robbenhaar < [email protected]>:
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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 <[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
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 <[email protected]>:
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 <[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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/
Sergiu, the operating system encoding is "Cp1252". Is this the problem? Cordialment, Julio 2016-06-25 9:51 GMT-03:00 Sergiu Dumitriu <[email protected]>:
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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 <[email protected]>:
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Sergiu Dumitriu http://purl.org/net/sergiu/
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 <[email protected]>:
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 <[email protected]>:
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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 <[email protected]>:
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 <[email protected]>:
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 <[email protected]>:
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Clemens Klein-Robbenhaar -
Denis Gervalle -
Julio Brum -
Paul Libbrecht -
Sergiu Dumitriu