1

I m trying to insert urdu text in database but only "????" insert in it. But in local host its worked fine. Problem is facing on remote server when i deploy war on Cent-OS server. MySQL server 5.5.15 is running on the Cent-OS server.

i also set character-set to utf8.

I had searched a lot on many platform to find the sol. Change MySQL default character set to UTF-8 in my.cnf? Changing MySQL charset to UTF8 on linux so it will work with JDBC https://serverfault.com/questions/61016/install-mysql-client-and-mysql-server-with-default-charset-utf8-to-fedora-11

I am trying from last three days.

I need a best sol.

Community
  • 1
  • 1
Adeel
  • 13
  • 1
  • 7

2 Answers2

1

Simply add accept-charset='ISO-8859-15' in your form like that.

<form action="abc.php" method="post" accept-charset='ISO-8859-15' >
you form fields will come here
</form>

Thanks.

Muddasir Abbas
  • 1,699
  • 1
  • 20
  • 37
0

Make sure collation of your column is set to utf8, what I use is utf8_unicode_ci.

To check the collation you can run following command.

SHOW FULL COLUMNS FROM tablename
Hussain Fakhruddin
  • 3,202
  • 4
  • 25
  • 36
  • SHOW VARIABLES LIKE 'collation%'; SHOW VARIABLES LIKE 'character_set%'; with the help of these query i can see its utf8 character_set and utf8_unicode_ci collation. but i am still facing same issue of "?????" insertion in db when i deploy war on centos linux server. – Adeel May 21 '14 at 05:12
  • What is the output of query that I have shared for your table ? – Hussain Fakhruddin May 21 '14 at 19:05
  • USE db_trunk; SHOW FULL COLUMNS FROM tblcorporateaccountivrs -> No Output.... – Adeel May 22 '14 at 13:52