Skip to content

Instantly share code, notes, and snippets.

@hmelenok
Created September 1, 2016 16:50
Show Gist options
  • Save hmelenok/7a1e7b0910c761442f6be1ddebe7e014 to your computer and use it in GitHub Desktop.
Save hmelenok/7a1e7b0910c761442f6be1ddebe7e014 to your computer and use it in GitHub Desktop.
function to decode in js gmail base64 strings to normal UTF8 language
function base64DecodetoUTF8(string) {
return decodeURIComponent(escape(atob(string.split('-').join('+').split('_').join('/')) ));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment