aspose file tools*
The moose likes JForum and the fly likes Fixed: Incorrect DB encoding - posts with ? instead of national characters in UTF-8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Fixed: Incorrect DB encoding - posts with ? instead of national characters in UTF-8" Watch "Fixed: Incorrect DB encoding - posts with ? instead of national characters in UTF-8" New topic
Author

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

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fixed: Incorrect DB encoding - posts with ? instead of national characters in UTF-8