Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Re: BIP39 foreign language wordlists not sorted
by
johoe
on 05/07/2015, 20:44:02 UTC
⭐ Merited by ABCbits (2)
Code:
>LANG=C sort japanese.txt | diff japanese.txt -
 あたる
+あっしゅく
 あつい
 あつかう
-あっしゅく
 あつまり
 あつめる
 あてな
 あてはまる
 あひる
+あふれる
 あぶら
 あぶる
-あふれる
 あまい
...

So in the word list っ and つ are sorted as the same letter.  This may be standard for japanese localization, but if you don't have this localization installed you get a different order.  The bad thing is that the binary-search method in the bip39 mnemonics tool doesn't work if the list is not sorted.  Thus, for example, the unit tests of python-mnemonics fail.