[xwiki-users] XWiki encoding problem
Hi, I have encountered an encoding problem during migration from 0.9.8 to 1.3 : some character, like "ù", are encoded in strange way, like "ù". I followed the howto on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding, but the result was the same. I give you some data: 0.9.8: - HTML, Tomcat, XWiki: ISO-8859-1 - MySql, System: UTF-8 - None was specified in the hibernate.cfg.xml file 1.3: - HTML, XWiki, System, Hibernate, Jetty, hsqldb: UTF-8 I also tried with different encoding configuration, i.e.: XWiki, HTML and Jetty with ISO-8859-1, but nothing happened. The migration was made using the import/export tool. Can you help me? Thanks Diego
Diego Ruotolo ha scritto:
Hi, I have encountered an encoding problem during migration from 0.9.8 to 1.3 : some character, like "ù", are encoded in strange way, like "ù". I followed the howto on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding, but the result was the same. I give you some data:
0.9.8: - HTML, Tomcat, XWiki: ISO-8859-1 - MySql, System: UTF-8 - None was specified in the hibernate.cfg.xml file
1.3: - HTML, XWiki, System, Hibernate, Jetty, hsqldb: UTF-8
I also tried with different encoding configuration, i.e.: XWiki, HTML and Jetty with ISO-8859-1, but nothing happened. The migration was made using the import/export tool. Can you help me? Thanks
Diego
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, anyone can help me, please? Thanks -- ------------------------------------------------------------------------ *Diego Ruotolo* [[email protected]] Soluzioni e Servizi per l'Amministrazione Universitaria *Tel.: +39 051 6171764* CINECA - Centro Interuniversitario di Calcolo via Magnanelli, 6/3 40033 Casalecchio di Reno (Bologna) - ITALY Tel: +39 051 6171 411 www.cineca.it ------------------------------------------------------------------------
Diego Ruotolo ha scritto:
Diego Ruotolo ha scritto:
Hi, I have encountered an encoding problem during migration from 0.9.8 to 1.3 : some character, like "ù", are encoded in strange way, like "ù". I followed the howto on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding, but the result was the same. I give you some data:
0.9.8: - HTML, Tomcat, XWiki: ISO-8859-1 - MySql, System: UTF-8 - None was specified in the hibernate.cfg.xml file
1.3: - HTML, XWiki, System, Hibernate, Jetty, hsqldb: UTF-8
I also tried with different encoding configuration, i.e.: XWiki, HTML and Jetty with ISO-8859-1, but nothing happened. The migration was made using the import/export tool. Can you help me? Thanks
Diego
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, anyone can help me, please? Thanks
Hi, I think the problem is an incorrect DTD. If I see HTML source the header is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> To support UTF-8, it should be: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Does anyone know how to change it? Thanks!
On Tue, 2008-03-18 at 12:44 +0100, Diego Ruotolo wrote:
I think the problem is an incorrect DTD. If I see HTML source the header is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
To support UTF-8, it should be:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Does anyone know how to change it?
For the albatross skin you can change it by modifying the velocity template htmlheader.vm i.e. the file ./skins/albatross/htmlheader.vm relative to your xwiki webapp root directory - $TOMCAT_DIR/webapps/xwiki/ . Anyway I don't understand how changing the doctype (as UTF-8 is a perfectly legal encoding for XHTML documents) would affect the encoding, which should get specified in the line before (always referring to albatross skin): <?xml version="1.0" encoding="$xwiki.encoding" ?> -- Marco ===== "We know nothing — that is the first point. Therefore we should be very modest — that is the second. That we should not claim to know when we do not know — that is the third." Karl R. Popper
Marco Fabbri ha scritto:
For the albatross skin you can change it by modifying the velocity template htmlheader.vm i.e. the file ./skins/albatross/htmlheader.vm relative to your xwiki webapp root directory - $TOMCAT_DIR/webapps/xwiki/ .
Anyway I don't understand how changing the doctype (as UTF-8 is a perfectly legal encoding for XHTML documents) would affect the encoding, which should get specified in the line before (always referring to albatross skin):
<?xml version="1.0" encoding="$xwiki.encoding" ?>
Hi, thanks for reply. I am using the toucan skin, and I couldn't find the template you told me (htmlheader.vm) in the skin directory. If you don't think that the doctype is the matter, could you five me any suggestion. I am going crazy of it! Thank you, Diego
Diego Ruotolo wrote:
Hi, I think the problem is an incorrect DTD. If I see HTML source the header is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
To support UTF-8, it should be:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Does anyone know how to change it?
Absolutely not. The doctype has nothing to do with encoding. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi, did you have a look in the MySql database? Maybe, the content became corrupt while the migration. How is the content, for example a "ù", stored in the database? -Marco
Diego Ruotolo ha scritto:
Hi, I have encountered an encoding problem during migration from 0.9.8 to 1.3 : some character, like "ù", are encoded in strange way, like "ù". I followed the howto on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding, but the result was the same. I give you some data:
0.9.8: - HTML, Tomcat, XWiki: ISO-8859-1 - MySql, System: UTF-8 - None was specified in the hibernate.cfg.xml file
1.3: - HTML, XWiki, System, Hibernate, Jetty, hsqldb: UTF-8
I also tried with different encoding configuration, i.e.: XWiki, HTML and Jetty with ISO-8859-1, but nothing happened. The migration was made using the import/export tool. Can you help me? Thanks
Marco K. ha scritto:
Hi,
did you have a look in the MySql database? Maybe, the content became corrupt while the migration. How is the content, for example a "ù", stored in the database?
-Marco_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, thanks for your reply. Now I use the HSQLDB, here's some character from file xwiki_db.script (the file containing the entire DB): ù = \u00c3\u00b9 à = \u00c3\u00a0 As example consider the character "à". The UTF-8 encode is: "C3 A0", the Javascript escape is: "\u00E0". Here there's a strange "mix": the sintax of Javascript escapes, but the value of UTF-8, that is to say: "\u00c3\u00a0". This is a javascript escape that correspond to the character "Ã", that is visualized instead of "à". I think the import/export tool could have some problem. I hope everything is clear. Thanks! Diego
Marco K. ha scritto:
Hi,
did you have a look in the MySql database? Maybe, the content became corrupt while the migration. How is the content, for example a "ù", stored in the database?
-Marco_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, thanks for your reply. Now I use the HSQLDB, here's some character from file xwiki_db.script (the file containing the entire DB): ù = \u00c3\u00b9 à = \u00c3\u00a0 As example consider the character "à". The UTF-8 encode is: "C3 A0", the Javascript escape is: "\u00E0". Here there's a strange "mix": the sintax of Javascript escapes, but the value of UTF-8, that is to say: "\u00c3\u00a0". This is a javascript escape that correspond to the character "Ã", that is visualized instead of "à". I think the import/export tool could have some problem. I hope everything is clear. Thanks! Diego
participants (4)
-
Diego Ruotolo -
Marco Fabbri -
Marco K. -
Sergiu Dumitriu