0

How can i convert this string using php to readable string?

for example:

/%d7%a6%d7%95%d7%a8-%d7%a7%d7%a9%d7%a8/

this string is in hebrew

Thanks

1

2 Answers 2

1

You should use mb_convert_encoding

echo mb_convert_encoding("/%d7%a6%d7%95%d7%a8-%d7%a7%d7%a9%d7%a8/", 'UTF-8', 'UTF-16BE');
Sign up to request clarification or add additional context in comments.

1 Comment

Hi, @6339 your code convert this to chinese characters and not to hebrew
0

For example,

$string = '%u05E1%u05E2';
$string = preg_replace('/%u([0-9A-F]+)/', '&#x$1;', $string);
echo html_entity_decode($string, ENT_COMPAT, 'UTF-8');

1 Comment

HI @Insane Skulll i tried with my string and this code did not work. can you please check with my string? /%d7%a6%d7%95%d7%a8-%d7%a7%d7%a9%d7%a8/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.