Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

upgrade from mysql3.23 to mysql4.1 charset problem

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

I just upgraded my mysql to 4.1
Now I have all local character corrupted.

It seems to me that in previous mysql you wrote UTF8 in the database converting on the fly and in 4.1 you assume you wrote take directly the string to the database.

Since I upgraded I have the UTF8 that show on the pages. (and no changing the charset in the browser is no help)

Do you have some indications on what I could do to solve that?

[originally posted on jforum.net by pala]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the answers there:

http://www.coderanch.com/t/575012
[originally posted on jforum.net by pala]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi the problem is changing now.

In fact I had also the problem of collacte conflict, I solved it by removing encoding informations in the connection String.

I solved the data encoding problem by putting back a mysql with --default-character-set=utf8

I bump now in another problem:

Whenever I do one of the following:

click on a forum to read it.
click on user list.
click on users in admin panel.

I have this error:




here come the stack trace:


[originally posted on jforum.net by pala]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pala wrote:
I found the answers there:

http://www.coderanch.com/t/575012

Thank you! I am running (stable) 2.1.4 of JForum and I recently needed to upgrade MySQL to the 4.1.x version. I fixed the first problem with the encoding formats. However, almost immediately after that I hit this problem.

After seeing your post I checked there and found the solution. For anyone else that needs the fix, I'll post it here so that it's more clear. You must replace your mysql jdbc driver in the JForum package, which is the following file:



Delete that file and replace it with the older 3.0 branch of the driver from the MySQL site here.

I used version 3.0.17 and this fixed everything for me. Just unzip/untar the download, and copy the file "mysql-connector-java-3.0.17-ga-bin.jar" (or similar version) into your"jforum/WEB-INF/lib" directory. Again, if the other file is still in there ("mysql-connector-java-3.1.4-beta-bin.jar") just delete it. Then restart your application (or container). Everything should then be working properly.
[originally posted on jforum.net by fcgreg]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic