I need to count how long in bytes a textarea is when UTF8 encoded using javascript. Any idea how I would do this?
thanks!
encodeURIComponent(text).replace(/%[A-Fd]{2}/g, 'U').length
1.4m articles
1.4m replys
5 comments
57.0k users