java - Input and Display unicode characters in jTextField -


i have java gui program input , display text in database keep on getting question marks non-english characters in jtextfield when retrieve database.

for input can copy/paste non english characters textfield , displays correctly (when pasted). database insert goes fine without error. since java unicode based, expecting go smoothly.

other information might help

development environment

os: windows xp non-english character support installed

java

jdk 1.6 update23

backend

mysql 5.5

encoding: utf8

collation: utf8_general_ci

though application in english, want able input , display utf8 characters in fields. need suggestion.

i had similar problem. insert unicode chars insert query when type in jtextfield , press add button inserted db corrupted. editing connection string solved problem.

jdbc:mysql://localhost:3306/databasename?useunicode=true&characterencoding=utf8  

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -