Show Hebrew in php response

I am posting a JSON response through a php script that has some Hebrew words. but when I run this script in the browser, it shows '?' instead of Jewish characters.

The FYI .. database is in the hebrew_general_ci hierarchy

Any help would be appreciated.

thanks..

+3
source share
3 answers

You cannot include the corresponding CSS file. also the charset variable is another problem when using native languages. use utf-8 if you use a unicode font like

there may also be a problem if the generated eot font does not fit. I'm not sure that Hebrew needs such a font.

+1
source

HTTP Content-Type HTML-, , JSON. PHP :

header('Content-Type: text/html; charset="windows-1255"');
0

, :

header('Content-Type: text/html; charset=YOUR_CHOSEN_CHARSET');

Try charset=utf8or charset=iso-8859-8. There's a list of character sets here .

0
source

Source: https://habr.com/ru/post/1722953/


All Articles