fix unicode bug

This commit is contained in:
Arinerron 2017-03-27 22:14:08 -07:00
parent 7f57f6b9be
commit f7d579c48d

View File

@ -156,12 +156,12 @@ $('#go').click(function(){
} }
} }
// convert result to binary // convert result to binary
output = textToBin(input); output = textToBin(encodeURIComponent(input));
$('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero)); $('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero));
} }
else else
{ {
var output = binToText(input); var output = decodeURIComponent(binToText(input));
if ($('#useEncrypt').is(':checked')) if ($('#useEncrypt').is(':checked'))
{ {
if (verifyPass('decrypt')) if (verifyPass('decrypt'))