I have a script that converts UTF8 to htmlentities. The result for the euro sign is €. I am trying to convert this back into latin (ISO-8859-15) which I believe has the euro sign in it.
When I try
html_entity_decode('€', ENT_QUOTES, 'ISO-8859-15');
it does not convert it to
â¬
How do I do this? (The final output will be a windows txt file.)
Edit ** I change the input string to make it more obvious as some people did not pick up on this in the second sentence.
Windows does not follow the ISO charsets, it uses an older encoding:
html_entity_decode($string, ENT_QUOTES, 'CP1251');
The Euro symbol becomes \x88 there, whereas Latin-9/ISO-8859-15 would have \xA4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With