From f7d579c48d107be0326df9c8c140e0d1a7d0e9bd Mon Sep 17 00:00:00 2001 From: Arinerron Date: Mon, 27 Mar 2017 22:14:08 -0700 Subject: [PATCH] fix unicode bug --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 9a5e6d7..aa44dfe 100755 --- a/main.js +++ b/main.js @@ -156,12 +156,12 @@ $('#go').click(function(){ } } // convert result to binary - output = textToBin(input); + output = textToBin(encodeURIComponent(input)); $('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero)); } else { - var output = binToText(input); + var output = decodeURIComponent(binToText(input)); if ($('#useEncrypt').is(':checked')) { if (verifyPass('decrypt'))