Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Farsi problem in MySQL

  Asked By: Everett    Date: Jul 28    Category: Java    Views: 1790

I make a table in MyAQL and set
charset : uft8
collation : utf8-persian-ci
When I write Farsi in JTextArea and send to dataBase by JDBCConnrction
it doesn't correct save. Can anyone help me ?



5 Answers Found

Answer #1    Answered By: Oscar Evans     Answered On: Jul 28

correct your URL
and try again

Answer #2    Answered By: Michael Evans     Answered On: Jul 28

set the respose's character encoding to utf-8

Answer #3    Answered By: Woodrow Jones     Answered On: Jul 28

you must add unicode (utf) setting to your database  connection parameters.
check my sql documents there is a complete description about this

Answer #4    Answered By: Iris Sanders     Answered On: Jul 28

You can cross all characters from a filter and force them to use UTF8 character encoding.maybe using Filterchain solve your problem.

Answer #5    Answered By: Olga Allen     Answered On: Jul 28

go to your mysql  and in mysql command prompt type

mysql> show varibles like '%char%';

and also

mysql> show global varibles like '%char%';

and see the results;
database, connection and system variables should be utf-8

if not, you can change this settings by adding

in your my.cnf or my.ini below [mysql] and [client]

and restart mysql service.

Didn't find what you were looking for? Find more on Farsi problem in MySQL Or get search suggestion and latest updates.