0

This ASCII letter (MS-DOS Hebrew / CP862):

need to output this (UTF-8/Windows-1255):

א

Those methods give me no result so far:

$string = "€";
echo iconv('CSPC862LATINHEBREW', 'Windows-1255',  $string);
echo iconv('CSPC862LATINHEBREW', 'UTF-8',  $string);
echo iconv('CSPC862LATINHEBREW', 'CP862',  $string);

echo mb_convert_encoding($string, 'UTF-8', 'CSPC862LATINHEBREW');
echo mb_convert_encoding($string, 'Windows-1255', 'CSPC862LATINHEBREW');
echo mb_convert_encoding($string, 'CP862', 'CSPC862LATINHEBREW');
Swissa Yaakov
  • 186
  • 3
  • 15
  • I guess your approach will not work, because the char € in MS-DOS Hebrew / CP862 will be not א in UTF-8/Windows-1255. What is your actual goal? Do you want to "translate" the euro symbol into hebrew? – ToyRobotic Apr 07 '19 at 17:47
  • i have files in ASCII format and i want to convert them to Hebrew strings in php – Swissa Yaakov Apr 07 '19 at 17:56
  • Why do you want it? ASCII is a subset of UTF-8 and Hebrew should by also part of UTF-8. – ToyRobotic Apr 07 '19 at 18:11

0 Answers0