tadd japanese, fix utf8 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1e75d6f8541ab0cd8922ee1ecd6756d4a103a9e5 DIR parent b32fbd210c46940166f7f716c831f2eae486c573 HTML Author: ThomasV <thomasv@gitorious> Date: Wed, 3 Sep 2014 17:21:43 +0200 add japanese, fix utf8 Diffstat: M lib/commands.py | 2 +- M lib/mnemonic.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -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 DIR diff --git a/lib/mnemonic.py b/lib/mnemonic.py t@@ -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' t@@ -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