aboutsummaryrefslogtreecommitdiff
path: root/src/js/jsbip39.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/jsbip39.js')
-rw-r--r--src/js/jsbip39.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/js/jsbip39.js b/src/js/jsbip39.js
index 025f625..95a2a0e 100644
--- a/src/js/jsbip39.js
+++ b/src/js/jsbip39.js
@@ -149,21 +149,14 @@ var Mnemonic = function(language) {
149 // Set space correctly depending on the language 149 // Set space correctly depending on the language
150 // see https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md#japanese 150 // see https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md#japanese
151 var space = " "; 151 var space = " ";
152 if (language == "japanese") { 152 if (language == "japanese" || language == "korean") {
153 space = "\u3000"; // ideographic space 153 space = "\u3000"; // ideographic space
154 } 154 }
155 return words.join(space); 155 return words.join(space);
156 } 156 }
157 157
158 self.normalizeString = function(str) { 158 self.normalizeString = function(str) {
159 if (typeof str.normalize == "function") { 159 return str.normalize("NFKD");
160 return str.normalize("NFKD");
161 }
162 else {
163 // TODO decide how to handle this in the future.
164 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
165 return str;
166 }
167 } 160 }
168 161
169 function byteArrayToWordArray(data) { 162 function byteArrayToWordArray(data) {