From: Ian Coleman Date: Mon, 7 May 2018 23:11:30 +0000 (+1000) Subject: Korean uses ascii spaces, not ideographic spaces X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=956e44efd75941d7b6613a947de663923d5be7b3 Korean uses ascii spaces, not ideographic spaces --- diff --git a/src/js/index.js b/src/js/index.js index fc7e13b..1e8b616 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1155,7 +1155,7 @@ function wordArrayToPhrase(words) { var phrase = words.join(" "); var language = getLanguageFromPhrase(phrase); - if (language == "japanese" || language == "korean") { + if (language == "japanese") { phrase = words.join("\u3000"); } return phrase; diff --git a/src/js/jsbip39.js b/src/js/jsbip39.js index 95a2a0e..3230e3b 100644 --- a/src/js/jsbip39.js +++ b/src/js/jsbip39.js @@ -149,7 +149,7 @@ var Mnemonic = function(language) { // Set space correctly depending on the language // see https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md#japanese var space = " "; - if (language == "japanese" || language == "korean") { + if (language == "japanese") { space = "\u3000"; // ideographic space } return words.join(space);