0

I cant insert persian link in databse;

Example:

False:

http://jik545.ir/item-444352-%D9%BE%DB%8C%D8%A7%D9%85-%D8%B1%D8%B2%D9%85%D8%A7%DB%8C%D8%B4-%D8%AF%D8%B1%DB%8C%D8%A7%DB%8C%DB%8C-%D8%A7%DB%8C%D8%B1%D8%A7%D9%86-%D8%A8%D8%B1%D8%A7%DB%8C-%D9%85%D8%B0%D8%A7%DA%A9%D8%B1%D8%A7%D8%AA-%D9%87%D8%B3%D8%AA%D9%87-%D8%A7%DB%8C.html

True:

http://jik545.ir/item-444352-رزمایش-دریایی-ایران-برای-مذاکرات-هسته-ای.html

Could you please help me to achieve this?

Vitalii Zurian
  • 17,858
  • 4
  • 64
  • 81
JIK
  • 1
  • 1
    **related :** http://stackoverflow.com/questions/6859018/save-data-in-arabic-in-mysql-database – adeneo Feb 27 '15 at 16:43
  • 1
    or: http://stackoverflow.com/questions/279170/utf-8-all-the-way-through – CD001 Feb 27 '15 at 16:44
  • ... actually, that looks like it's url-encoded; and since it's an URL it's probably correct; just chuck it into http://meyerweb.com/eric/tools/dencoder/ and you'll see what I mean - you could probably run it through `urldecode()` (http://php.net/manual/en/function.urldecode.php) before entering it into the database. – CD001 Feb 27 '15 at 16:51

1 Answers1

1

Set the collation on the table/database/field to utf8

Mateusz Majewski
  • 280
  • 1
  • 10