Last active
August 29, 2015 14:17
-
-
Save Higgs1/0efe62a05fa12d3333dc to your computer and use it in GitHub Desktop.
CoffeeScript UTF8 Codec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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