diff options
| author | Tomaz Solc <tomaz.solc@tablix.org> | 2020-12-20 12:12:35 +0100 |
|---|---|---|
| committer | Tomaz Solc <tomaz.solc@tablix.org> | 2020-12-20 12:18:52 +0100 |
| commit | 3529535286cabf4f29eb0074a59c7d07eb975d32 (patch) | |
| tree | e04fca0d6026cbf4dbf5b888f35eedd2eb7222dc /unidecode | |
| parent | 35736d98b3faaed195c710928a01d16873340e63 (diff) | |
| download | unidecode-3529535286cabf4f29eb0074a59c7d07eb975d32.tar.gz | |
Mass replace '' -> None.
To make use of the new 'errors' argument.
'' was used in the original Perl tables both to mean an unknown replacement and
an intentional replacement with and empty string. Here I only replace it in
ranges I've added later where I'm reasonably sure that '' means unknown
replacement.
Diffstat (limited to 'unidecode')
| -rw-r--r-- | unidecode/x1d4.py | 24 | ||||
| -rw-r--r-- | unidecode/x1d6.py | 78 | ||||
| -rw-r--r-- | unidecode/x1d7.py | 412 | ||||
| -rw-r--r-- | unidecode/x1f1.py | 276 |
4 files changed, 395 insertions, 395 deletions
diff --git a/unidecode/x1d4.py b/unidecode/x1d4.py index 5379593..7d23fd4 100644 --- a/unidecode/x1d4.py +++ b/unidecode/x1d4.py @@ -84,7 +84,7 @@ data = ( 'e', # 0x52 'f', # 0x53 'g', # 0x54 -'', # 0x55 +None, # 0x55 'i', # 0x56 'j', # 0x57 'k', # 0x58 @@ -156,23 +156,23 @@ data = ( 'y', # 0x9a 'z', # 0x9b 'A', # 0x9c -'', # 0x9d +None, # 0x9d 'C', # 0x9e 'D', # 0x9f -'', # 0xa0 -'', # 0xa1 +None, # 0xa0 +None, # 0xa1 'G', # 0xa2 -'', # 0xa3 -'', # 0xa4 +None, # 0xa3 +None, # 0xa4 'J', # 0xa5 'K', # 0xa6 -'', # 0xa7 -'', # 0xa8 +None, # 0xa7 +None, # 0xa8 'N', # 0xa9 'O', # 0xaa 'P', # 0xab 'Q', # 0xac -'', # 0xad +None, # 0xad 'S', # 0xae 'T', # 0xaf 'U', # 0xb0 @@ -185,9 +185,9 @@ data = ( 'b', # 0xb7 'c', # 0xb8 'd', # 0xb9 -'', # 0xba +None, # 0xba 'f', # 0xbb -'', # 0xbc +None, # 0xbc 'h', # 0xbd 'i', # 0xbe 'j', # 0xbf @@ -195,7 +195,7 @@ data = ( 'l', # 0xc1 'm', # 0xc2 'n', # 0xc3 -'', # 0xc4 +None, # 0xc4 'p', # 0xc5 'q', # 0xc6 'r', # 0xc7 diff --git a/unidecode/x1d6.py b/unidecode/x1d6.py index c06a855..2be1a7f 100644 --- a/unidecode/x1d6.py +++ b/unidecode/x1d6.py @@ -165,8 +165,8 @@ data = ( 'z', # 0xa3 'i', # 0xa4 'j', # 0xa5 -'', # 0xa6 -'', # 0xa7 +None, # 0xa6 +None, # 0xa7 'Alpha', # 0xa8 'Beta', # 0xa9 'Gamma', # 0xaa @@ -218,41 +218,41 @@ data = ( 'chi', # 0xd8 'psi', # 0xd9 'omega', # 0xda -'', # 0xdb -'', # 0xdc -'', # 0xdd -'', # 0xde -'', # 0xdf -'', # 0xe0 -'', # 0xe1 -'', # 0xe2 -'', # 0xe3 -'', # 0xe4 -'', # 0xe5 -'', # 0xe6 -'', # 0xe7 -'', # 0xe8 -'', # 0xe9 -'', # 0xea -'', # 0xeb -'', # 0xec -'', # 0xed -'', # 0xee -'', # 0xef -'', # 0xf0 -'', # 0xf1 -'', # 0xf2 -'', # 0xf3 -'', # 0xf4 -'', # 0xf5 -'', # 0xf6 -'', # 0xf7 -'', # 0xf8 -'', # 0xf9 -'', # 0xfa -'', # 0xfb -'', # 0xfc -'', # 0xfd -'', # 0xfe -'', # 0xff +None, # 0xdb +None, # 0xdc +None, # 0xdd +None, # 0xde +None, # 0xdf +None, # 0xe0 +None, # 0xe1 +None, # 0xe2 +None, # 0xe3 +None, # 0xe4 +None, # 0xe5 +None, # 0xe6 +None, # 0xe7 +None, # 0xe8 +None, # 0xe9 +None, # 0xea +None, # 0xeb +None, # 0xec +None, # 0xed +None, # 0xee +None, # 0xef +None, # 0xf0 +None, # 0xf1 +None, # 0xf2 +None, # 0xf3 +None, # 0xf4 +None, # 0xf5 +None, # 0xf6 +None, # 0xf7 +None, # 0xf8 +None, # 0xf9 +None, # 0xfa +None, # 0xfb +None, # 0xfc +None, # 0xfd +None, # 0xfe +None, # 0xff ) diff --git a/unidecode/x1d7.py b/unidecode/x1d7.py index 6943bf4..46242ec 100644 --- a/unidecode/x1d7.py +++ b/unidecode/x1d7.py @@ -1,210 +1,210 @@ data = ( -'', # 0x00 -'', # 0x01 -'', # 0x02 -'', # 0x03 -'', # 0x04 -'', # 0x05 -'', # 0x06 -'', # 0x07 -'', # 0x08 -'', # 0x09 -'', # 0x0a -'', # 0x0b -'', # 0x0c -'', # 0x0d -'', # 0x0e -'', # 0x0f -'', # 0x10 -'', # 0x11 -'', # 0x12 -'', # 0x13 -'', # 0x14 -'', # 0x15 -'', # 0x16 -'', # 0x17 -'', # 0x18 -'', # 0x19 -'', # 0x1a -'', # 0x1b -'', # 0x1c -'', # 0x1d -'', # 0x1e -'', # 0x1f -'', # 0x20 -'', # 0x21 -'', # 0x22 -'', # 0x23 -'', # 0x24 -'', # 0x25 -'', # 0x26 -'', # 0x27 -'', # 0x28 -'', # 0x29 -'', # 0x2a -'', # 0x2b -'', # 0x2c -'', # 0x2d -'', # 0x2e -'', # 0x2f -'', # 0x30 -'', # 0x31 -'', # 0x32 -'', # 0x33 -'', # 0x34 -'', # 0x35 -'', # 0x36 -'', # 0x37 -'', # 0x38 -'', # 0x39 -'', # 0x3a -'', # 0x3b -'', # 0x3c -'', # 0x3d -'', # 0x3e -'', # 0x3f -'', # 0x40 -'', # 0x41 -'', # 0x42 -'', # 0x43 -'', # 0x44 -'', # 0x45 -'', # 0x46 -'', # 0x47 -'', # 0x48 -'', # 0x49 -'', # 0x4a -'', # 0x4b -'', # 0x4c -'', # 0x4d -'', # 0x4e -'', # 0x4f -'', # 0x50 -'', # 0x51 -'', # 0x52 -'', # 0x53 -'', # 0x54 -'', # 0x55 -'', # 0x56 -'', # 0x57 -'', # 0x58 -'', # 0x59 -'', # 0x5a -'', # 0x5b -'', # 0x5c -'', # 0x5d -'', # 0x5e -'', # 0x5f -'', # 0x60 -'', # 0x61 -'', # 0x62 -'', # 0x63 -'', # 0x64 -'', # 0x65 -'', # 0x66 -'', # 0x67 -'', # 0x68 -'', # 0x69 -'', # 0x6a -'', # 0x6b -'', # 0x6c -'', # 0x6d -'', # 0x6e -'', # 0x6f -'', # 0x70 -'', # 0x71 -'', # 0x72 -'', # 0x73 -'', # 0x74 -'', # 0x75 -'', # 0x76 -'', # 0x77 -'', # 0x78 -'', # 0x79 -'', # 0x7a -'', # 0x7b -'', # 0x7c -'', # 0x7d -'', # 0x7e -'', # 0x7f -'', # 0x80 -'', # 0x81 -'', # 0x82 -'', # 0x83 -'', # 0x84 -'', # 0x85 -'', # 0x86 -'', # 0x87 -'', # 0x88 -'', # 0x89 -'', # 0x8a -'', # 0x8b -'', # 0x8c -'', # 0x8d -'', # 0x8e -'', # 0x8f -'', # 0x90 -'', # 0x91 -'', # 0x92 -'', # 0x93 -'', # 0x94 -'', # 0x95 -'', # 0x96 -'', # 0x97 -'', # 0x98 -'', # 0x99 -'', # 0x9a -'', # 0x9b -'', # 0x9c -'', # 0x9d -'', # 0x9e -'', # 0x9f -'', # 0xa0 -'', # 0xa1 -'', # 0xa2 -'', # 0xa3 -'', # 0xa4 -'', # 0xa5 -'', # 0xa6 -'', # 0xa7 -'', # 0xa8 -'', # 0xa9 -'', # 0xaa -'', # 0xab -'', # 0xac -'', # 0xad -'', # 0xae -'', # 0xaf -'', # 0xb0 -'', # 0xb1 -'', # 0xb2 -'', # 0xb3 -'', # 0xb4 -'', # 0xb5 -'', # 0xb6 -'', # 0xb7 -'', # 0xb8 -'', # 0xb9 -'', # 0xba -'', # 0xbb -'', # 0xbc -'', # 0xbd -'', # 0xbe -'', # 0xbf -'', # 0xc0 -'', # 0xc1 -'', # 0xc2 -'', # 0xc3 -'', # 0xc4 -'', # 0xc5 -'', # 0xc6 -'', # 0xc7 -'', # 0xc8 -'', # 0xc9 -'', # 0xca -'', # 0xcb -'', # 0xcc -'', # 0xcd +None, # 0x00 +None, # 0x01 +None, # 0x02 +None, # 0x03 +None, # 0x04 +None, # 0x05 +None, # 0x06 +None, # 0x07 +None, # 0x08 +None, # 0x09 +None, # 0x0a +None, # 0x0b +None, # 0x0c +None, # 0x0d +None, # 0x0e +None, # 0x0f +None, # 0x10 +None, # 0x11 +None, # 0x12 +None, # 0x13 +None, # 0x14 +None, # 0x15 +None, # 0x16 +None, # 0x17 +None, # 0x18 +None, # 0x19 +None, # 0x1a +None, # 0x1b +None, # 0x1c +None, # 0x1d +None, # 0x1e +None, # 0x1f +None, # 0x20 +None, # 0x21 +None, # 0x22 +None, # 0x23 +None, # 0x24 +None, # 0x25 +None, # 0x26 +None, # 0x27 +None, # 0x28 +None, # 0x29 +None, # 0x2a +None, # 0x2b +None, # 0x2c +None, # 0x2d +None, # 0x2e +None, # 0x2f +None, # 0x30 +None, # 0x31 +None, # 0x32 +None, # 0x33 +None, # 0x34 +None, # 0x35 +None, # 0x36 +None, # 0x37 +None, # 0x38 +None, # 0x39 +None, # 0x3a +None, # 0x3b +None, # 0x3c +None, # 0x3d +None, # 0x3e +None, # 0x3f +None, # 0x40 +None, # 0x41 +None, # 0x42 +None, # 0x43 +None, # 0x44 +None, # 0x45 +None, # 0x46 +None, # 0x47 +None, # 0x48 +None, # 0x49 +None, # 0x4a +None, # 0x4b +None, # 0x4c +None, # 0x4d +None, # 0x4e +None, # 0x4f +None, # 0x50 +None, # 0x51 +None, # 0x52 +None, # 0x53 +None, # 0x54 +None, # 0x55 +None, # 0x56 +None, # 0x57 +None, # 0x58 +None, # 0x59 +None, # 0x5a +None, # 0x5b +None, # 0x5c +None, # 0x5d +None, # 0x5e +None, # 0x5f +None, # 0x60 +None, # 0x61 +None, # 0x62 +None, # 0x63 +None, # 0x64 +None, # 0x65 +None, # 0x66 +None, # 0x67 +None, # 0x68 +None, # 0x69 +None, # 0x6a +None, # 0x6b +None, # 0x6c +None, # 0x6d +None, # 0x6e +None, # 0x6f +None, # 0x70 +None, # 0x71 +None, # 0x72 +None, # 0x73 +None, # 0x74 +None, # 0x75 +None, # 0x76 +None, # 0x77 +None, # 0x78 +None, # 0x79 +None, # 0x7a +None, # 0x7b +None, # 0x7c +None, # 0x7d +None, # 0x7e +None, # 0x7f +None, # 0x80 +None, # 0x81 +None, # 0x82 +None, # 0x83 +None, # 0x84 +None, # 0x85 +None, # 0x86 +None, # 0x87 +None, # 0x88 +None, # 0x89 +None, # 0x8a +None, # 0x8b +None, # 0x8c +None, # 0x8d +None, # 0x8e +None, # 0x8f +None, # 0x90 +None, # 0x91 +None, # 0x92 +None, # 0x93 +None, # 0x94 +None, # 0x95 +None, # 0x96 +None, # 0x97 +None, # 0x98 +None, # 0x99 +None, # 0x9a +None, # 0x9b +None, # 0x9c +None, # 0x9d +None, # 0x9e +None, # 0x9f +None, # 0xa0 +None, # 0xa1 +None, # 0xa2 +None, # 0xa3 +None, # 0xa4 +None, # 0xa5 +None, # 0xa6 +None, # 0xa7 +None, # 0xa8 +None, # 0xa9 +None, # 0xaa +None, # 0xab +None, # 0xac +None, # 0xad +None, # 0xae +None, # 0xaf +None, # 0xb0 +None, # 0xb1 +None, # 0xb2 +None, # 0xb3 +None, # 0xb4 +None, # 0xb5 +None, # 0xb6 +None, # 0xb7 +None, # 0xb8 +None, # 0xb9 +None, # 0xba +None, # 0xbb +None, # 0xbc +None, # 0xbd +None, # 0xbe +None, # 0xbf +None, # 0xc0 +None, # 0xc1 +None, # 0xc2 +None, # 0xc3 +None, # 0xc4 +None, # 0xc5 +None, # 0xc6 +None, # 0xc7 +None, # 0xc8 +None, # 0xc9 +None, # 0xca +None, # 0xcb +None, # 0xcc +None, # 0xcd '0', # 0xce '1', # 0xcf '2', # 0xd0 diff --git a/unidecode/x1f1.py b/unidecode/x1f1.py index 4bc82b5..888f274 100644 --- a/unidecode/x1f1.py +++ b/unidecode/x1f1.py @@ -10,11 +10,11 @@ data = ( '7,', # 0x08 '8,', # 0x09 '9,', # 0x0a -'', # 0x0b -'', # 0x0c -'', # 0x0d -'', # 0x0e -'', # 0x0f +None, # 0x0b +None, # 0x0c +None, # 0x0d +None, # 0x0e +None, # 0x0f '(A)', # 0x10 '(B)', # 0x11 '(C)', # 0x12 @@ -44,9 +44,9 @@ data = ( '<S>', # 0x2a '(C)', # 0x2b '(R)', # 0x2c -'', # 0x2d -'', # 0x2e -'', # 0x2f +None, # 0x2d +None, # 0x2e +None, # 0x2f '[A]', # 0x30 '[B]', # 0x31 '[C]', # 0x32 @@ -73,12 +73,12 @@ data = ( '[X]', # 0x47 '[Y]', # 0x48 '[Z]', # 0x49 -'', # 0x4a -'', # 0x4b -'', # 0x4c -'', # 0x4d -'', # 0x4e -'', # 0x4f +None, # 0x4a +None, # 0x4b +None, # 0x4c +None, # 0x4d +None, # 0x4e +None, # 0x4f '(A)', # 0x50 '(B)', # 0x51 '(C)', # 0x52 @@ -105,12 +105,12 @@ data = ( '(X)', # 0x67 '(Y)', # 0x68 '(Z)', # 0x69 -'', # 0x6a -'', # 0x6b -'', # 0x6c -'', # 0x6d -'', # 0x6e -'', # 0x6f +None, # 0x6a +None, # 0x6b +None, # 0x6c +None, # 0x6d +None, # 0x6e +None, # 0x6f '[A]', # 0x70 '[B]', # 0x71 '[C]', # 0x72 @@ -137,122 +137,122 @@ data = ( '[X]', # 0x87 '[Y]', # 0x88 '[Z]', # 0x89 -'', # 0x8a -'', # 0x8b -'', # 0x8c -'', # 0x8d -'', # 0x8e -'', # 0x8f -'', # 0x90 -'', # 0x91 -'', # 0x92 -'', # 0x93 -'', # 0x94 -'', # 0x95 -'', # 0x96 -'', # 0x97 -'', # 0x98 -'', # 0x99 -'', # 0x9a -'', # 0x9b -'', # 0x9c -'', # 0x9d -'', # 0x9e -'', # 0x9f -'', # 0xa0 -'', # 0xa1 -'', # 0xa2 -'', # 0xa3 -'', # 0xa4 -'', # 0xa5 -'', # 0xa6 -'', # 0xa7 -'', # 0xa8 -'', # 0xa9 -'', # 0xaa -'', # 0xab -'', # 0xac -'', # 0xad -'', # 0xae -'', # 0xaf -'', # 0xb0 -'', # 0xb1 -'', # 0xb2 -'', # 0xb3 -'', # 0xb4 -'', # 0xb5 -'', # 0xb6 -'', # 0xb7 -'', # 0xb8 -'', # 0xb9 -'', # 0xba -'', # 0xbb -'', # 0xbc -'', # 0xbd -'', # 0xbe -'', # 0xbf -'', # 0xc0 -'', # 0xc1 -'', # 0xc2 -'', # 0xc3 -'', # 0xc4 -'', # 0xc5 -'', # 0xc6 -'', # 0xc7 -'', # 0xc8 -'', # 0xc9 -'', # 0xca -'', # 0xcb -'', # 0xcc -'', # 0xcd -'', # 0xce -'', # 0xcf -'', # 0xd0 -'', # 0xd1 -'', # 0xd2 -'', # 0xd3 -'', # 0xd4 -'', # 0xd5 -'', # 0xd6 -'', # 0xd7 -'', # 0xd8 -'', # 0xd9 -'', # 0xda -'', # 0xdb -'', # 0xdc -'', # 0xdd -'', # 0xde -'', # 0xdf -'', # 0xe0 -'', # 0xe1 -'', # 0xe2 -'', # 0xe3 -'', # 0xe4 -'', # 0xe5 -'', # 0xe6 -'', # 0xe7 -'', # 0xe8 -'', # 0xe9 -'', # 0xea -'', # 0xeb -'', # 0xec -'', # 0xed -'', # 0xee -'', # 0xef -'', # 0xf0 -'', # 0xf1 -'', # 0xf2 -'', # 0xf3 -'', # 0xf4 -'', # 0xf5 -'', # 0xf6 -'', # 0xf7 -'', # 0xf8 -'', # 0xf9 -'', # 0xfa -'', # 0xfb -'', # 0xfc -'', # 0xfd -'', # 0xfe -'', # 0xff +None, # 0x8a +None, # 0x8b +None, # 0x8c +None, # 0x8d +None, # 0x8e +None, # 0x8f +None, # 0x90 +None, # 0x91 +None, # 0x92 +None, # 0x93 +None, # 0x94 +None, # 0x95 +None, # 0x96 +None, # 0x97 +None, # 0x98 +None, # 0x99 +None, # 0x9a +None, # 0x9b +None, # 0x9c +None, # 0x9d +None, # 0x9e +None, # 0x9f +None, # 0xa0 +None, # 0xa1 +None, # 0xa2 +None, # 0xa3 +None, # 0xa4 +None, # 0xa5 +None, # 0xa6 +None, # 0xa7 +None, # 0xa8 +None, # 0xa9 +None, # 0xaa +None, # 0xab +None, # 0xac +None, # 0xad +None, # 0xae +None, # 0xaf +None, # 0xb0 +None, # 0xb1 +None, # 0xb2 +None, # 0xb3 +None, # 0xb4 +None, # 0xb5 +None, # 0xb6 +None, # 0xb7 +None, # 0xb8 +None, # 0xb9 +None, # 0xba +None, # 0xbb +None, # 0xbc +None, # 0xbd +None, # 0xbe +None, # 0xbf +None, # 0xc0 +None, # 0xc1 +None, # 0xc2 +None, # 0xc3 +None, # 0xc4 +None, # 0xc5 +None, # 0xc6 +None, # 0xc7 +None, # 0xc8 +None, # 0xc9 +None, # 0xca +None, # 0xcb +None, # 0xcc +None, # 0xcd +None, # 0xce +None, # 0xcf +None, # 0xd0 +None, # 0xd1 +None, # 0xd2 +None, # 0xd3 +None, # 0xd4 +None, # 0xd5 +None, # 0xd6 +None, # 0xd7 +None, # 0xd8 +None, # 0xd9 +None, # 0xda +None, # 0xdb +None, # 0xdc +None, # 0xdd +None, # 0xde +None, # 0xdf +None, # 0xe0 +None, # 0xe1 +None, # 0xe2 +None, # 0xe3 +None, # 0xe4 +None, # 0xe5 +None, # 0xe6 +None, # 0xe7 +None, # 0xe8 +None, # 0xe9 +None, # 0xea +None, # 0xeb +None, # 0xec +None, # 0xed +None, # 0xee +None, # 0xef +None, # 0xf0 +None, # 0xf1 +None, # 0xf2 +None, # 0xf3 +None, # 0xf4 +None, # 0xf5 +None, # 0xf6 +None, # 0xf7 +None, # 0xf8 +None, # 0xf9 +None, # 0xfa +None, # 0xfb +None, # 0xfc +None, # 0xfd +None, # 0xfe +None, # 0xff ) |
