

Plain text is never plain: UTF-8 in one post
Characters, code points and bytes are three different things. How UTF-8 turns one into the other, why "ñ" sometimes shows up as "ñ", and what it means for HTML, CSS and JavaScript.
2 posts with this tag.


Characters, code points and bytes are three different things. How UTF-8 turns one into the other, why "ñ" sometimes shows up as "ñ", and what it means for HTML, CSS and JavaScript.


btoa('ñ') gives the wrong answer and btoa('😀') throws. Base64 works on bytes, so text has to become bytes first. How my Base64 tool does it, and how it tells bad input from binary data.