2

I'm trying to convert Hebrew characters from UTF-8 to ISO-8859-8-1 in order to save them into a file. I have read about ten posts here , in this site, no matter what I do, I always get question marks (???????) instead of hebrew letters. I tried iconv(), mb_convert_encoding(), utf8_decode(), all of them convert from UTF-8 to ISO-8859-8-1 but I keep getting '?????????' in the file.

mb_convert_encoding($fullRecord, 'ISO-8859-1', 'UTF-8');
iconv("UTF-8", "ISO-8859-1", $fullRecord);
iconv("UTF-8", "ISO-8859-1//TRANSLIT", $fullRecord);

Even this post didn't help because the solution there is in javascript: Conversion from UTF8 to ASCII I wish it could be in php...

I know that there are no hebrew characters in ASCII, but i have an example file that shows it can be done. when I open the file in notepad , it shows hebrew ok and the file is ANSI , so I guess it can be done somehow...

anyone please help?

Community
  • 1
  • 1
Rodniko
  • 4,926
  • 20
  • 69
  • 93

1 Answers1

2

try

iconv("UTF-8", "windows-1255", $fullRecord);
Mostafa King
  • 113
  • 2
  • 10
  • 1
    Yes!!!!! its working!!! i guess i should read more about windows-1255. the file opens in notepad with correct hebrew characters and the file is still ANSI. thank you :) – Rodniko Mar 04 '14 at 19:47