I have an XML ISO-8859-1 page, in which I have to output symbols like é.
If I output é it errors out. é works just fine.
So, what PHP function should I use to transform é to é
I can't move to utf-8 (as I assume some will suggest and rightfully so) This is a huge, legacy code.
Use mb_convert_encoding:
mb_convert_encoding("é", "HTML-ENTITIES", "ISO-8859-1");
gives ‚.
This example does not require that you enter the "é", which you may or may not be doing in ISO-8859-1:
mb_convert_encoding(chr(130), "HTML-ENTITIES", "ISO-8859-1");
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