Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • 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]
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic