database charset issue
- Status
- Closed
- Subject
- database charset issue
- Category
- Error
- Feature
- Database MySQL (MyISAM)
All / Undefined - Resolution status
- Fixed or Solved
- Lastmod by
- pkdille
- Rating
- Description
we're having a charset issue when displaying tikiwiki pages.
The pages themselves are correctly sent as UTF-8: data coming from the localization files is fine.
However, data coming from the tikiwiki database is latin1, and those characters are shown as ? in a lozenge.The database is encoded as UTF-8, but the default encoding for MySQL, set at build-time, is Latin1. So it appears that there is an implicit conversion done when getting/putting data to and from the DB.
Data received is converted from UTF-8 to Latin1, and data sent is considered to be Latin1 (though it is UTF-8), and converted again: the end result in the database is corrupted again.It seems that this happens because tikiwiki uses the default charset encoding from the MySQL engine. On another system, with the same MySQL version, but built to use UTF-8 as default (--with-charset=utf-8), there is no problem.
It should probably use the "SET NAMES utf8" command to set the charset encoding, as described there:
http://dev.mysql.com/doc/refman/5.0/en/set-option.html
Software used is:
Solaris 9
Apache 2.2.3
PHP 4.4.4
MySQL 5.0.24a- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is currently unavailableUnable to connect to show2.tiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 929
- Created
- Wednesday 08 November, 2006 16:30:00 UTC
by Unknown - LastModif
- Monday 06 October, 2008 19:25:51 UTC