htmlspecialchars
How to replace decoded Non-breakable space (nbsp)
Problem Explanation The reason why it’s not working is that you are specifying the non-breaking space incorrectly. The proper code for the non-breaking space in the UTF-8 encoding is 0xC2A0, it consists of two bytes – 0xC2 (194) and 0xA0 (160), so technically, you’re specifying only the half of the character’s code. A Bit of … Read more
What do the ENT_HTML5, ENT_HTML401, … modifiers on html_entity_decode do?
I started wondering what behavior these constants have when I saw these constants at the htmlspecialchars page. The documentation was rubbish, so I started digging in the source code of PHP. Basically, these constants affect whether certain entities are encoded or not (or decoded for html_entity_decode). The most obvious effect is whether the apostrophe (‘) … Read more
is there a way to highlight all the special accent characters in sublime text or any other text editor?
Yes. Sublime text supports regular expression and you can select all non-ASCII (code point > 128) characters. This regex find should be enough for you: [^\x00-\x7F] Just search and replace. But if you are doing manual HTML encode in the first place you are doing it wrong. Save your files as UTF-8 encoding (Sublime Text … Read more