X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/2b8007d64661e859fadfc971e57fa8869489c7f2..6f6e60f925b87554070609dac33e78ea681e112e:/pokedex/roomaji.py diff --git a/pokedex/roomaji.py b/pokedex/roomaji.py index 7740f0d..e91c960 100644 --- a/pokedex/roomaji.py +++ b/pokedex/roomaji.py @@ -86,11 +86,12 @@ def romanize(string): last_char = None # Used for small kana combos for char in string: # Full-width Latin - if ord(char) >= 0xff11 and ord(char) <= 0xff5e: + if 0xff01 <= ord(char) <= 0xff5e: if last_kana == 'sokuon': raise ValueError("Sokuon cannot precede Latin characters.") - char = chr(ord(char) - 0xff11 + 0x31) + # XXX Real Unicode decomposition would be nicer + char = chr(ord(char) - 0xff01 + 0x21) characters.append(char) last_kana = None