-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] The generated secret.html file does not support UTF-8 chars #7
Comments
I'm not a web developer, this is one quirk of Javascript I have not had time to fight with and tame.
Except if the string contains unicode, then Probably related to that. I'll eventually get around to look into it and fix it. |
Fixes mprimi#7 using a Blob rather than btoa (as btoa() creates a Base64-encoded ASCII string). Side modifiation, the {{VALUES}}\n substitution does not works on my environnement as the substituion is searching for a litteral \n in the template. Feel free to remove this modification if it's not relevant and I juste missed something along the way :-)
Is this fixed? |
I did fork the project and fix it (see: https://github.com/TeddyBear06/portable-secret) but the maintainer won't merge as stated here (and we all understand why 😇): #29. Working live version: https://lfconsult.fr/portable-secret/index.html Feel free to use my fork/fix. |
@TeddyBear06 is the change to blob you proposed (https://github.com/mprimi/portable-secret/pull/23/files) sufficient to handle these non-ascii characters? Because if so I'm inclined to take your change. |
Hey @mprimi Short answer: Yep. Long answer: Blobs aren't "encoding aware" (it's just raw binary data after all). The Blob will store the supplied content "as is" and spit it out when we call I hope I'm not missing something along the way but, that's the whole idea. |
Fixes #7 using a Blob rather than btoa (as btoa() creates a Base64-encoded ASCII string). Side modifiation, the {{VALUES}}\n substitution does not works on my environnement as the substituion is searching for a litteral \n in the template. Feel free to remove this modification if it's not relevant and I juste missed something along the way :-)
Hi,
When I use chars like the german-umlaute "öäü" they will get Replaced with ���
Maybe the secret.html is exported with ASCII encoding and not UTF-8 so that the chars are lost when JS is handling them?
The text was updated successfully, but these errors were encountered: