SyntaxFix
Write A Post
Hire A Developer
Questions
There is a great tool for calculating the bytes of any string in UTF-8: http://mothereff.in/byte-counter
Update: @mathias has made the code public: https://github.com/mathiasbynens/mothereff.in/blob/master/byte-counter/eff.js