Getting € with htmlentities

I am really trying to show what htmlentities gives me, but it does not give a euro either; for the symbol €.

I'm trying to

echo htmlentities(htmlentities("LISBOA-VIENA DESDE 99€ TAXAS INCLUÍDAS, RESERVE JÁ",ENT_COMPAT,ISO-8859-1),ENT_COMPAT,ISO-8859-1);
    echo '<br>';
    echo htmlentities(htmlentities("LISBOA-VIENA DESDE 99€ TAXAS INCLUÍDAS, RESERVE JÁ",ENT_COMPAT,UTF-8),ENT_COMPAT,UTF-8);

and for both I get

LISBOA-VIENA DESDE 99 € TAXAS INCLU & Iacute; DAS, RESERVE J & Aacute;

LISBOA-VIENA DESDE 99 € TAXAS INCLU & Iacute; DAS, RESERVE J & Aacute;

I never get a euro;

Does anyone know how to do this correctly?

+3
source share
3 answers

This is stated here ; It seems that € ( &#8364;) works often.

+1
source

What is the original encoding of the file in the file in which you use these instructions?

Windows, , Windows-1252 (CP1252), ISO-8859-1, ISO-8859-2 UTF-8.

0x80 Windows-1252, ISO-8859-15 0xA4, ISO-8859-1 (. Aron Rotteveel). , , , htmlentities(). UTF-8 .

htmlentities("LISBOA-VIENA DESDE 99€ TAXAS INCLUÍDAS, RESERVE JÁ",ENT_COMPAT,'Windows-1252') , CP1252.

, . .

+8

ISO-8859-15 ISO-8859-1.

ISO-8859-15 (ISO Latin 9) ISO-8859-1 (ISO Latin 1) , Latin-1 (ISO-8859-1).

echo htmlentities('Working htmlentities() now 99€ off!', ENT_COMPAT, 'ISO-8859-15');

Working htmlentities() now 99&euro; off!
+6

All Articles