2

I'm trying to convert some characters with PHP before inserting to MySQL DB a JSON object with this kind of data:

\u00c9

that means: É

I tried this but it didn't work:

echo utf8_encode(print_r('\u00c9'));

I've read that it's in Unicode but i can't find the way to print it before inserting it. Any ideas?

Dharman
  • 30,962
  • 25
  • 85
  • 135
matuuz
  • 135
  • 1
  • 5
  • 11

1 Answers1

2

Take a look at this answer. TL;DR:

echo json_decode('"\u00c9"');
Community
  • 1
  • 1
cOle2
  • 4,725
  • 1
  • 24
  • 26