• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic