Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CoffeeScript UTF8 Codec
# Converts UCS2 to UTF8
utf8_encode = (s) ->
unescape encodeURIComponent s
# Converts UTF8 to UCS2
utf8_decode = (s) ->
decodeURIComponent escape s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.