JavaScript library for character encoding