1

Unicode:

\u0000T\u0000h\u0000i\u0000s\u0000 \u0000i\u0000s\u0000 \u0000a\u0000 \u0000t\u0000e\u0000s\u0000t\u0000\ufffd\ufffd\ufffd

Text:

This is a testííí

I am receiving this unicode in post request. How to convert above unicode to text. I want to store decoded text in database & database only accept utf-8 formatting.

This is what I have tried & what I got :

json_decode() => This is a test���

utf8_encode() => \u0000T\u0000h\u0000i\u0000s\u0000 \u0000i\u0000s\u0000 \u0000a\u0000 \u0000t\u0000e\u0000s\u0000t\u0000\ufffd\ufffd\ufffd

mb_convert_encoding() => 屵〰〰呜田〰と屵〰〰楜田〰び屵〰〰⁜田〰ど屵〰〰獜田〰〠屵〰〰慜田〰〠屵〰〰瑜田〰づ屵〰〰獜田〰ぴ屵〰〰屵晦晤屵晦晤屵晦晤

Omi
  • 3,954
  • 5
  • 21
  • 41
  • Possible duplicate of [PHP and accent characters (Ba\u015f\u00e7\u0131l)](https://stackoverflow.com/questions/5306934/php-and-accent-characters-ba-u015f-u00e7-u0131l) – Deadooshka Aug 02 '17 at 23:01
  • @Deadooshka I want to store that text in database & database accept only `utf-8` – Omi Aug 02 '17 at 23:05
  • https://stackoverflow.com/questions/5059706/php-chr-with-unicode-values – chiliNUT Aug 02 '17 at 23:28

0 Answers0