1

I have a php form that supports Arabic characters.But an issue here is characters entered in Arabic show "question marks" in mysql. I found out the issue is due to character Unicode and I fixed it.

How we can change the existing data to Arabic? Now it shows as "question marks". A Bulk set of users already registered.

Tobias Kienzler
  • 25,759
  • 22
  • 127
  • 221
vks
  • 6,649
  • 7
  • 36
  • 55
  • set you database encoding to UTF-8 general CI – Dipesh Parmar Sep 03 '13 at 06:32
  • 1
    possible duplicate of [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Álvaro González Sep 03 '13 at 06:33
  • set the table / table field where you going to store the strings to utf8-general-ci – talsibony Sep 03 '13 at 06:34
  • 1
    The question mark you're referring to is it an actual question mark "?" or the [replacement character �](https://en.wikipedia.org/wiki/Replacement_character) – Tobias Kienzler Sep 03 '13 at 06:54
  • GUYZ i need to change the existing characters to arabic , i fixed the newly inserted case. – vks Sep 03 '13 at 07:12
  • If you have actual "?" characters stored in your database, you're already screwed; there's no way to fix those. If you are having *display problems* with data which is just stored in a messed up format but still recoverable, it depends on how it screwed up exactly. We need more details here. – deceze Sep 03 '13 at 07:56

1 Answers1

0

If you can work out what character set the "?" are really stored then you may be able to use the php iconv() function.

The docs.

Use the MySql HEX() function to find out what is really stored in the column.

James Anderson
  • 27,109
  • 7
  • 50
  • 78