Hi Gilles,
I change the java-mysql lib file to mysql-connector-java-5.0.2-beta. It
still does not work.
Sincerely, Wang Ning
2007/3/17, Gilles Serasset <Gilles.Serasset(a)imag.fr>fr>:
Hi Sergiu,
Maybe the modif I did on my instance did solve the problem. If not, then
it's related to java-mysql connection...
see XWIKI-951
Gilles,
On 16 mars 07, at 18:03, Sergiu Dumitriu wrote:
On 3/16/07, Gilles Serasset <Gilles.Serasset(a)imag.fr> wrote:
Hi Ning,
I also have a utf8 instance and I cannot reproduce your bug even when
mixing French and Japanese characters. I'm using postgres though, but mysql
qhould work also.
However, I can reproduce this, on a fully UTF-8 system: OS, disk,
database, XWiki settings.
It seems that when working with the document archive the characters are
broken. In the database everything is OK, so it's something internal.
When did you set up your wiki to use UTF8 characters ? Maybe you created
the database with an ISO Latin 1 encoding and
then change your wiki encoding
after the DB creation ?
What happens when you ask to see the modifications between the current
version and an older one ? Do you correctly see the chinese chars of the
older version ?
And by the way, Sergiu, I think the velocity.properties parameter are
just useless (as far as I could test) as the velocity macros are called
using Strings and not using InputStreams, in fact, it could hurt a little
when reading the xxx.vm files that are not encoded in UTF-8 (see
discussion on the encoding of the code base...).
Indeed, I did not notice anything when changing this. But I don't know
what internal stuff might break if I don't set this.
I think that this only affect the way .vm files stored on the disk are
read, but these files are plain ASCII.
Regards, Gilles,
On 16 mars 07, at 16:27, ning wang wrote:
I do everything you said. And I make sure that all encoding is UTF-8 or
utf8.
But I'm sad to find that it does not work, still "?????" when roll
back.
2007/3/16, Sergiu Dumitriu < sergiu.dumitriu(a)gmail.com>gt;:
Some ideas:
* Check that the tables are really using UTF-8: get a mysql shell,
open the xwiki database and type "select charset(xwd_content from
xwikidoc;". If it does not say UTF-8, then you need to change the encoding.
I've attached a script that tries to do that (and creates indexes, too)
* Check that the mysql connections are set to UTF-8. "show variables
like 'character_set%';". If it says something else, you can either globally
set the mysql encoding to utf-8 (in the mysql configuration file, search the
mysql documentation), or configure hibernate to request this:
<xwiki-dir>/WEB-INF/hibernate.cfg.xml, add
<property name="connection.characterEncoding">utf8</property>
after:
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
* Check that you set all the encoding parameters to UTF-8:
** in WEB-INF/xwiki.cfg: xwiki.encoding=UTF-8
** in WEB-INF/ web.xml:
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
** in WEB-INF/velocity.properties:
input.encoding=UTF-8
output.encoding=UTF-8
After this, it should work just fine.
--
http://purl.org/net/sergiu
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.orgmailing list.
To unsubscribe:
mailto:xwiki-users-unsubscribe@objectweb.org<xwiki-users-unsubscribe@objectweb.org>
For general help:
mailto:sympa@objectweb.org?subject=help<sympa@objectweb.org?subject=help>
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Gilles Sérasset
GETALP-LIG
BP 53 - F-38041 Grenoble Cedex 9
Phone: +33 4 76 51 43 80
Fax: +33 4 76 44 66 75
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.orgmailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws