| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,8 +31,8 @@ def unidecode(string): | |||
| 31 | 31 | retval.append(char) | |
| 32 | 32 | continue | |
| 33 | 33 | ||
| 34 | - if codepoint > 0xffff: | ||
| 35 | - continue # We don't support characters beyond the BMP. | ||
| 34 | + if codepoint > 0xeffff: | ||
| 35 | + continue # Characters in Private Use Area and above are ignored | ||
| 36 | 36 | ||
| 37 | 37 | section = codepoint >> 8 # Chop off the last two hex digits | |
| 38 | 38 | position = codepoint % 256 # Last two hex digits | |
@@ -41,7 +41,7 @@ def unidecode(string): | |||
| 41 | 41 | table = Cache[section] | |
| 42 | 42 | except KeyError: | |
| 43 | 43 | try: | |
| 44 | - mod = __import__('unidecode.x%02x'%(section), [], [], ['data']) | ||
| 44 | + mod = __import__('unidecode.x%03x'%(section), [], [], ['data']) | ||
| 45 | 45 | except ImportError: | |
| 46 | 46 | Cache[section] = None | |
| 47 | 47 | continue # No match: ignore this character and carry on. | |
@@ -51,4 +51,4 @@ def unidecode(string): | |||
| 51 | 51 | if table and len(table) > position: | |
| 52 | 52 | retval.append( table[position] ) | |
| 53 | 53 | ||
| 54 | - return ''.join(retval) | ||
| 54 | + return ''.join(retval) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments