Skip to content

Instantly share code, notes, and snippets.

@VEINHORN
Created April 17, 2014 00:02
Show Gist options
  • Save VEINHORN/10943568 to your computer and use it in GitHub Desktop.
Save VEINHORN/10943568 to your computer and use it in GitHub Desktop.
// UTF-8 encode / decode by Johan Sundstr?m
function encode_utf8( s )
{
return unescape( encodeURIComponent( s ) );
}
function decode_utf8( s )
{
return decodeURIComponent( escape( s ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment