hello,
I have JForum 2.1.6 configured under
Tomcat 5.0.28 hosted on Solaris 10 x86. We use mysql 4.1.7 as a database server. Though we mostly use JForum for English language communication when I just tried to post both message title and body in Russian they were displayed correctly both in preview and when saved to db.
Concerning your internationalization question..Do you have other webapps under the same web container (I guess you also use Tomcat) configured to display Cyrillic characters correctly? I do remember what a pain was to get Ukrainian characters displayed correctly under our other web app.
At that time it appeared that to get Cyryllic displayed well you need to configure it both at database server level and in your web app.
So,
1. Our mysql database server is started with --default-character-set=utf8 option. Then you need to set a default character set for your specific database to utf8. If you already have them created with latin1, pls make sure you issue alter table on all tables and set utf8 as a default encoding for all tables in your database. After long hrs (or days) of investigation of this problem in our other web app I noticed that though I converted my database to utf8 some tables still had latin1 as a default encoding and that was the problem.
2. At a web app level, we use a SetCharacterEncodingFilter to set utf8 at request and response objects before they are accessed by a user code. Our installation of JForum seems to work without it. Next,
you should check your
JDBC connection URL to see whether characterEncoding=utf8 is added to it (this is mysql specific but there should be smth similar for other RDBMSs).
Basically, if you do steps 1, 2 it should work for you. But there is also an option of the system's default encoding. If you're using linux, checkout the file /etc/sysconfig/i18n. I think you need some UTF8 encoding there too (not just cp1251, though I'm not sure). At my laptop it is:
LANG=uk_UA.UTF-8.
BTW, do you use any
Java ide on your linux? Can you type Cyrillic symbols in the IDE editors? JDK versions prior to 1.5.0 seemed to have some bug which prevented proper Cyrillic display.
And finally, concerning examining db tables in console. Though we have Ukrainian characters correctly displayed in our web app and JForum installation I still cannot read them through my console at Solaris box. I get those familiar ??? marks. It is because console also has to be configured to display UTF8 correctly. So, I think if you're on linux you'll have to play a little with the system's default encoding property.
Hope this helps.
Regards,
Andrew Stepanenko
[originally posted on jforum.net by andrew.stepanenko]