electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 1e75d6f8541ab0cd8922ee1ecd6756d4a103a9e5
parent b32fbd210c46940166f7f716c831f2eae486c573
Author: ThomasV <thomasv@gitorious>
Date:   Wed,  3 Sep 2014 17:21:43 +0200

add japanese, fix utf8

Diffstat:
Mlib/commands.py | 2+-
Mlib/mnemonic.py | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/commands.py b/lib/commands.py @@ -134,7 +134,7 @@ class Commands: def make_seed(self, nbits, custom_entropy, language): from mnemonic import Mnemonic s = Mnemonic(language).make_seed(nbits, custom_entropy) - return s + return s.encode('utf8') def check_seed(self, seed, custom_entropy, language): from mnemonic import Mnemonic diff --git a/lib/mnemonic.py b/lib/mnemonic.py @@ -37,6 +37,8 @@ class Mnemonic(object): filename = 'english.txt' elif lang[0:2] == 'pt': filename = 'portuguese.txt' + elif lang[0:2] == 'ja': + filename = 'japanese.txt' else: filename = 'english.txt' @@ -48,7 +50,7 @@ class Mnemonic(object): line = line.strip(' \r') assert ' ' not in line if line: - self.wordlist.append(line) + self.wordlist.append(line.decode('utf8')) print_error("wordlist has %d words"%len(self.wordlist)) @classmethod