How to pass a mysql record to php and be sure that it is UTF-8 encoded -


i have problem, data defined utf-8 in mysql database. when pass php , format json don't utf-8 signs.

i have put in header utf-8

header("content-type: application/json; charset=utf-8"); 

what can next?

what can next?

you can replace entire script this

<?php header("content-type: application/json; charset=utf-8"); printf('{chr:"%s"}', "\xc6\x94");// Ɣ  http://www.fileformat.info/info/unicode/char/0194/index.htm 

and try use it. if works, means either data in db isnt utf8, or way retrieve doesn't preserve utf8.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -