What is the name of this type of encoding?

If you copy and paste the following text into your html page,

انوان

You will receive the following Arabic text:

Ψ§Ω†ΩˆΨ§Ω†

My question is:

What is the name of this type of encoding that includes numbers and the hash sign (#), and how to decode it in PHP?

+3
source share
4 answers

These are ... HTML entities (or "Numeric Symbolic Links" for nitpickers).

Give it a try html_entity_decode.

Example:

$foo = html_entity_decode('انوان');
// gives you the arabic words in $foo

(If the line is on the form ا..., you need to apply twice html_entity_decode. (I don't know if editing codaddict is acceptable.))

+8
source

HTML-. , , & , HTML. HTML.

PHP html_entity_decode

+3

convert_uudecode() .

<?php
echo convert_uudecode("+22!L;W9E(%!(4\"$`\n`"); //It prints I love PHP!
echo "\n";
echo convert_uudecode('&#1575;&#1606;&#1608;&#1575;&#1606;'); //It prints WUΒ±
?>
0

:

  • &amp; , amp.
  • &#1575; , U + 0627 (1575 ) Unicode.

, . .

0

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


All Articles