Created
March 16, 2015 17:35
-
-
Save rreinhardt9/bfe3de4b423ab3eb4a22 to your computer and use it in GitHub Desktop.
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
// To debug a base64 with invalid characters, here called 'buggy' | |
for (var i = 0; i < buggy.length; i++) { | |
if (buggy[i].charCodeAt(0) > 255) { | |
console.warn('found character ' + buggy[i].charCodeAt(0) + ' "' + buggy[i] + '" at position ' + i); | |
} | |
} | |
// From here: | |
// http://stackoverflow.com/a/25171633 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment