user4519247
user4519247

Reputation:

Hebrew words and letters become question marks

I'm trying to recieve information from text file, and however when it's in hebrew, it shows "????" instead of the hebrew word

I can't change the file encoding, because ZaraRadio Outputs it, so I tried to set the charset of file to UTF-8, this way:

$npf = "CurrentSong.txt";
$ans = file_get_contents($npf);
$ans = mb_convert_encoding($ans, "UTF-8", "auto");

but it still not working...

any suggestions? thanks.

Upvotes: 1

Views: 295

Answers (1)

Joni
Joni

Reputation: 111409

Most likely auto will not serve because the file is encoded in a single byte encoding. You don't say which encoding it uses, but ISO-8859-8 is probably it.

$ans = mb_convert_encoding($ans, "UTF-8", "ISO-8859-8");

Upvotes: 1

Related Questions