Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Internationalization - JSP and MySQL  RSS feed

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going round and round in circles, having serious issues relating to international characters being stored in and viewed from the database.

I have my database set as UTF-8, page encoding as <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> and the connection to the database as useUnicode=true&characterEncoding=utf-8

Still and for the reason which escapes me is that any special charcaters are initially not stored correctly, for example 'çanak çömlek patladı' would be stored as 'çanak çömlek patlad?' if I then read back from the database 'çanak çömlek patlad?' and then re save without modifying the data, the text 'çanak çömlek patlad?' now looks like '￧anak ￧�mlek patlad?'

If again I dont update any content and re save the page the result is then '?anak ??mlek patlad?' its at this point where no matter how many times I save the record i keep '?anak ??mlek patlad?' but its still not the original text entered which was 'çanak çömlek patladı'

One other issue is that this database has been migrated several times to which I have inherited, the are issues replating to old non ascii characters, is there any way to run a MySQL script to address each non ascii character and set as UTF-8?

Can someone please help??
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!