0

i WANT TO store Arabic words in my table of dictionary.

i am using a java script code for typing Arabic in a text box.

it is working fine.

After insertion into table when i get all the records, it properly shows Arabic words.

but in my table Arabic words store in this format
򂠏&#980980 ETC

Not in this format باالالا

that creates a problem for me. When i want to search any Arabic word from my table using word = $arabic OR

using word LIKE '%$arabic%'

it fails and shows no result.

Please help me for this problem.

NOTE

When i write query in query editor it store Arabic font in Arabic format.

I am using utf8-bin collation for Arabic column.

Failed Scientist
  • 1,977
  • 3
  • 29
  • 48
Ahsan
  • 85
  • 1
  • 1
  • 8

4 Answers4

2

change your table(columns) collation to utf8_general_ci and also in your html add

   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Wearybands
  • 2,438
  • 8
  • 34
  • 53
1

You have to do the following things: 1.set the UTF-8 in your php script,like this:

 ini_set('default_charset', 'utf-8');

2.make the Collation as utf8_general_ci in database.

Harshal
  • 3,562
  • 9
  • 36
  • 65
1

Set:

MySQL table charset to utf8, collation to utf8_general_ci or utf8_unicode_ci. and in your code(connection string) also set charset to utf8.

Sylca
  • 2,523
  • 4
  • 31
  • 51
0

you should ensure that the html support arabic text by adding

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

you should also check the encoding in your database , it should be utf8_unicode_ci or ther simalar encoding