• Post Reply Bookmark Topic Watch Topic
  • New Topic

Fixed: Incorrect DB encoding - posts with ? instead of national characters in UTF-8

Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've found out what was causing trouble with bad database encoding using MySQL database. All posts with national characters (???���...) contained question marks instead of national characters. It's because original files storing DB config like mysql.properties and jforum-custom.conf have bad connection strings for the UTF-8 encoding.

The whole string for UTF-8 encoding is lowercase by default but it HAS TO BE UPPERCASE like "UTF-8" in dbencoding property.

See the encoding reference for MySQL Connector/J for encoding names: http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-charsets.html

Of course you have to use mysql specific connection settings like mysql.useUnicode and mysql.encoding because MySQL needs to know the encoding of stored data. Since then all problems dissapeared and all post now show correct characters.

Bellow are the important functional setting from configuration files:

Technical Details:
DB: MySQL: 5.0.32-Debian
DB inner encoding: UTF-8 Unicode (utf8 )
JForum: 2.1.8 (system encoding UTF-8 )

Sorry for long post, Hope this will help someone ;)
Thank you JForum team for making so useful forum system

[originally posted on jforum.net by Tsafkiel]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!