3 ms·
>...by now you just use Unicode and forget that a named set of entities ever existed... OK. When I was in PHP, I often used "htmlspeciachars()" and it does th
by vmorgulis 11y ago
>...by now you just use Unicode and forget that a named set of entities ever existed...
OK.
When I was in PHP, I often used "htmlspeciachars()" and it does this kind of transform. That's why I tried that.
http://php.net/manual/en/function.htmlspecialchars.php http://php.net/manual/en/function.htmlspecialchars.php
I had some problems too with " " because it's 160 in ASCII and not a whitespace (32).
Edit: 160
- ygra 11y agoThe non-breaking space is certainly not 256 in ASCII (ASCII only extends to 127) and not even in Latin 1 (goes up to 255) and also not in Unicode – it's 160. While you can use in HTML you can also use or  , both of which work in XML as well. And since numeric and hexadecimal character references are much easier to generate (you don't need a lookup table) I'd say they're a far nicer choice these days.
- vmorgulis 11y ago> ... in HTML you can also use or   ... Yes! You're right. >... I'd say they're a far nicer choice these days. It was a long time ago for a scrapping project (garbage HTML).
- deleted 11y ago[deleted]