UTF-16 encoding for JavaScript