htmlentities.phpt 489 B

12345678910111213141516171819
  1. --TEST--
  2. HTML entities of ISO-8859 chars
  3. --INI--
  4. output_handler=
  5. --FILE--
  6. <?php
  7. setlocale (LC_CTYPE, "C");
  8. $sc_encoded = htmlspecialchars ("<>\"&åÄ\n",ENT_COMPAT,"ISO-8859-1");
  9. echo $sc_encoded;
  10. $ent_encoded = htmlentities ("<>\"&åÄ\n",ENT_COMPAT,"ISO-8859-1");
  11. echo $ent_encoded;
  12. echo html_entity_decode($sc_encoded,ENT_COMPAT,"ISO-8859-1");
  13. echo html_entity_decode($ent_encoded,ENT_COMPAT,"ISO-8859-1");
  14. ?>
  15. --EXPECT--
  16. &lt;&gt;&quot;&amp;åÄ
  17. &lt;&gt;&quot;&amp;&aring;&Auml;
  18. <>"&åÄ
  19. <>"&åÄ