├── samesame.py
├── README.md
├── .gitignore
├── LICENSE
├── english_confusables.py
└── mappings.html
/samesame.py:
--------------------------------------------------------------------------------
1 | import english_confusables
2 |
3 | print(english_confusables.get_homograph("Malwrologist"))
4 |
5 | print(english_confusables.convert_to_ascii("𝐈𝟎𝐈𝔅١𝔑S",ignore_case=True))
6 |
7 | print(english_confusables.convert_to_ascii("𝐈𝟎𝐈𝔅١𝔑S",ignore_case=False))
8 |
9 | print(english_confusables.convert_to_ascii("01234"))
10 |
11 | print(english_confusables.convert_to_ascii("测试"))
12 |
13 |
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Introduction to PySameSame
2 | This is a python port of [samesame](https://github.com/TheTarquin/samesame) utility developed by @TheTarquin. It also offers a few more features that deemed to be useful.
3 |
4 | By using PySameSame, you can:
5 | 1. replace ASCII characters with homograph (look-alike) characters in a given string
6 | ```python
7 | homoglyph = english_confusables.get_homograph("this is for test")
8 |
9 | ```
10 |
11 | 2. obtain all of the potential ASCII representations of a given Unicode homoglyph.
12 | ```python
13 | ascii_reprs = english_confusables.convert_to_ascii("𝐈𝟎𝐈𝔅١𝔑S",ignore_case=True)
14 |
15 | ```
16 |
17 | 3. obtain an HTML table representing the internal mappings that is used by PySameSame
18 | ```python
19 | mappings = english_confusables.generate_table()
20 | ```
21 |
22 | 4. manually select a Unicode homoglyph for each English Alphabet and use the resulted mapping to transform a text using a [web interface](https://github.com/DissectMalware/PySameSame/blob/master/mappings.html).
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *.cover
47 | .hypothesis/
48 | .pytest_cache/
49 |
50 | # Translations
51 | *.mo
52 | *.pot
53 |
54 | # Django stuff:
55 | *.log
56 | local_settings.py
57 | db.sqlite3
58 |
59 | # Flask stuff:
60 | instance/
61 | .webassets-cache
62 |
63 | # Scrapy stuff:
64 | .scrapy
65 |
66 | # Sphinx documentation
67 | docs/_build/
68 |
69 | # PyBuilder
70 | target/
71 |
72 | # Jupyter Notebook
73 | .ipynb_checkpoints
74 |
75 | # pyenv
76 | .python-version
77 |
78 | # celery beat schedule file
79 | celerybeat-schedule
80 |
81 | # SageMath parsed files
82 | *.sage.py
83 |
84 | # Environments
85 | .env
86 | .venv
87 | env/
88 | venv/
89 | ENV/
90 | env.bak/
91 | venv.bak/
92 |
93 | # Spyder project settings
94 | .spyderproject
95 | .spyproject
96 |
97 | # Rope project settings
98 | .ropeproject
99 |
100 | # mkdocs documentation
101 | /site
102 |
103 | # mypy
104 | .mypy_cache/
105 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/english_confusables.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 |
4 | def get_confusables():
5 | confusables = {}
6 | confusables['A'] = ['\U0000FF21', '\U0001D400', '\U0001D434',
7 | '\U00019468', '\U0001D49C', '\U0001D4D0', '\U0001D504', '\U0001D538', '\U0001D56C',
8 | '\U0001D5A0', '\U0001D5D4', '\U0001D608',
9 | '\U0001D63C', '\U0001D670', '\U00001D00', '\U00000391', '\U0001D6A8', '\U0001D6E2',
10 | '\U0001D71C', '\U0001D756', '\U0001D790',
11 | '\U00000410', '\U000013AA', '\U000015C5', '\U0000A4EE', '\U000102A0']
12 |
13 | confusables['B'] = ['\U0000FF22', '\U0000212C', '\U0001D401', '\U0001D435', '\U0001D469', '\U0001D4D1',
14 | '\U0001D505',
15 | '\U0001D609', '\U0001D63D', '\U0001D671', '\U00000392', '\U0001D6A9', '\U0001D6E3',
16 | '\U0001D71D',
17 | '\U0001D757', '\U0001D791', '\U00000412', '\U000013F4', '\U000015F7', '\U0000A4D0',
18 | '\U00010282',
19 | '\U000102A1', '\U00010301', '\U0000A7B4', '\U00000432']
20 |
21 | confusables['C'] = ['\U0001F74C', '\U000118F2', '\U000118E9', '\U0000FF23', '\U0000216D', '\U00002102',
22 | '\U0000212D',
23 | '\U0001D402', '\U0001D436', '\U0001D46A', '\U0001D49E', '\U0001D4D2', '\U0001D56E',
24 | '\U0001D5A2',
25 | '\U0001D5D6', '\U0001D60A', '\U0001D63E', '\U0001D672', '\U000003FD', '\U00002CA4',
26 | '\U00000421',
27 | '\U000013DF', '\U0000A4DA', '\U000102A2', '\U00010302', '\U00010415', '\U0001051C',
28 | '\U000000C7',
29 | '\U000004AA', '\U00000187']
30 |
31 | confusables['D'] = ['\U0000216E', '\U00002145', '\U0001D403', '\U0001D437', '\U0001D46B', '\U0001D49F',
32 | '\U0001D4D3',
33 | '\U0001D507', '\U0001D53B', '\U0001D56F', '\U0001D5A3', '\U0001D5D7', '\U0001D60B',
34 | '\U0001D63F',
35 | '\U0001D673', '\U000013A0', '\U000015DE', '\U000015EA', '\U0000A4D3', '\U00000110',
36 | '\U000000D0', '\U00000189']
37 |
38 | confusables['E'] = ['\U000022FF', '\U0000FF25', '\U00002130', '\U0001D404', '\U0001D438', '\U0001D46C',
39 | '\U0001D4D4',
40 | '\U0001D508', '\U0001D53C', '\U0001D570', '\U0001D5A4', '\U0001D5D8', '\U0001D60C',
41 | '\U0001D640',
42 | '\U0001D674', '\U00000395', '\U0001D6AC', '\U0001D6E6', '\U0001D720', '\U0001D75A',
43 | '\U0001D794',
44 | '\U00000415', '\U00002D39', '\U000013AC', '\U0000A4F0', '\U000118A6', '\U000118AE',
45 | '\U00010286', '\U0000011A',
46 | '\U00000246', '\U00002107', '\U00000510', '\U000013CB', '\U00010401', '\U00000190']
47 |
48 | confusables['F'] = ['\U00002131', '\U0001D405', '\U0001D439', '\U0001D46D', '\U0001D4D5', '\U0001D509',
49 | '\U0001D53D',
50 | '\U0001D571', '\U0001D5A5', '\U0001D5D9', '\U0001D60D', '\U0001D641', '\U0001D675',
51 | '\U0000A798',
52 | '\U000003DC', '\U0001D7CA', '\U000015B4', '\U0000A4DD', '\U000118C2', '\U000118A2',
53 | '\U00010287',
54 | '\U000102A5', '\U00010525', '\U00000191']
55 |
56 | confusables['G'] = ['\U0001D406', '\U0001D43A', '\U0001D46E', '\U0001D4A2', '\U0001D4D6', '\U0001D50A',
57 | '\U0001D53E',
58 | '\U0001D572', '\U0001D5A6', '\U0001D5DA', '\U0001D60E', '\U0001D642', '\U0001D676',
59 | '\U0000050C',
60 | '\U000013C0', '\U000013F3', '\U0000A4D6', '\U000001E6', '\U0000011E', '\U000001E4',
61 | '\U00000193', '\U00000509']
62 |
63 | confusables['H'] = ['\U0000FF28', '\U0000210B', '\U0000210C', '\U0000210D', '\U0001D407', '\U0001D43B',
64 | '\U0001D46F',
65 | '\U0001D4D7', '\U0001D573', '\U0001D5A7', '\U0001D5DB', '\U0001D60F', '\U0001D643',
66 | '\U0001D677',
67 | '\U00000397', '\U0001D6AE', '\U0001D6E8', '\U0001D722', '\U0001D75C', '\U0001D796',
68 | '\U00002C8E',
69 | '\U0000041D', '\U000013BB', '\U0000157C', '\U0000A4E7', '\U000102CF', '\U00002C67',
70 | '\U000004A2',
71 | '\U00000126', '\U000004C9', '\U000004C7']
72 |
73 | confusables['I'] = ['\U0000FF29', '\U0001D6B0', '\U0001D62D', '\U00000406', '\U0001D5A8', '\U0001D425',
74 | '\U0000FE8D',
75 | '\U0000FE8E', '\U0001D529', '\U00002110', '\U00002111', '\U0001028A', '\U00002C92',
76 | '\U00010309',
77 | '\U00002113', '\U0001D724', '\U00000196', '\U0001D798', '\U00000399', '\U0001D695',
78 | '\U0001D7CF',
79 | '\U00002223', '\U00000627', '\U0000FF29', '\U0001D5C5', '\U0001D540', '\U00000031',
80 | '\U0001D644',
81 | '\U0001D4C1', '\U00010320', '\U0001D43C', '\U0001EE00', '\U0001EE80', '\U000005C0',
82 | '\U0001D470',
83 | '\U000001C0', '\U000004C0', '\U000016C1', '\U0001D7ED', '\U0001D574', '\U000007CA',
84 | '\U0000FF4C',
85 | '\U0001D6EA', '\U00002D4F', '\U0001D75E', '\U0001D55D', '\U0001D7E3', '\U000005D5',
86 | '\U0001E8C7',
87 | '\U0001D661', '\U0001D4D8', '\U0001D5DC', '\U0001D7D9', '\U0001D459', '\U000005DF',
88 | '\U00002160',
89 | '\U0001D610', '\U00000661', '\U0001D48D', '\U0001D591', '\U0000FFE8', '\U0001D408',
90 | '\U0000006C',
91 | '\U000006F1', '\U0000A4F2', '\U00016F28', '\U0001D678', '\U0001D7F7', '\U0001D4F5',
92 | '\U0000007C',
93 | '\U0000217C', '\U000023FD', '\U0001D5F9']
94 |
95 | confusables['J'] = ['\U0000FF2A', '\U0001D409', '\U0001D43D', '\U0001D471', '\U0001D4A5', '\U0001D4D9',
96 | '\U0001D50D',
97 | '\U0001D541', '\U0001D575', '\U0001D5A9', '\U0001D5DD', '\U0001D611', '\U0001D645',
98 | '\U0001D679',
99 | '\U0000037F', '\U00000408', '\U000013AB', '\U0000148D', '\U0000A4D9', '\U0000A7B2',
100 | '\U00000248',
101 | '\U00001499', '\U00000575', '\U0001D6A5']
102 |
103 | confusables['K'] = ['\U0000212A', '\U0000FF2B', '\U0001D40A', '\U0001D43E', '\U0001D472', '\U0001D4A6',
104 | '\U0001D4DA',
105 | '\U0001D50A', '\U0001D542', '\U0001D576', '\U0001D5AA', '\U0001D5DE', '\U0001D612',
106 | '\U0001D646',
107 | '\U0001D67A', '\U0000039A', '\U0001D6B1', '\U0001D6EB', '\U0001D725', '\U0001D75F',
108 | '\U0001D799',
109 | '\U00002C94', '\U0000041A', '\U000013E6', '\U000016D5', '\U0000A4D7', '\U00010518',
110 | '\U00002C69',
111 | '\U0000049A', '\U0000049E', '\U00000198']
112 |
113 | confusables['L'] = ['\U0000216C', '\U00002112', '\U0001D408', '\U0001D43F', '\U0001D473', '\U0001D4DB',
114 | '\U0001D50F',
115 | '\U0001D543', '\U0001D577', '\U0001D5AB', '\U0001D5DF', '\U0001D613', '\U0001D647',
116 | '\U0001D67B',
117 | '\U00002CD0', '\U000013DE', '\U000014AA', '\U0000A4E1', '\U000118A3', '\U000118B2',
118 | '\U0001041B',
119 | '\U00010526', '\U00000141', '\U000014B7', '\U0000013F']
120 |
121 | confusables['M'] = ['\U000F0F2D', '\U0000216F', '\U00002133', '\U0001D40C', '\U0001D440', '\U0001D474',
122 | '\U0001D4DC',
123 | '\U0001D510', '\U0001D544', '\U0001D578', '\U0001D5AC', '\U0001D5E0', '\U0001D614',
124 | '\U0001D648',
125 | '\U0001D67C', '\U0000039C', '\U0001D6B3', '\U0001D6ED', '\U0001D727', '\U0001D761',
126 | '\U0001D79B',
127 | '\U000003FA', '\U00002C98', '\U0000041C', '\U000013B7', '\U000015F0', '\U000016D6',
128 | '\U0000A4DF',
129 | '\U000102B0', '\U00010311', '\U000004CD']
130 |
131 | confusables['N'] = ['\U0000FF2E', '\U00002115', '\U0001D40D', '\U0001D441', '\U0001D475', '\U0001D4A9',
132 | '\U0001D4DD',
133 | '\U0001D511', '\U0001D579', '\U0001D5AD', '\U0001D5E1', '\U0001D615', '\U0001D649',
134 | '\U0001D67D',
135 | '\U0000039D', '\U0001D6B4', '\U0001D6EE', '\U0001D728', '\U0001D762', '\U0001D79C',
136 | '\U00002C9A',
137 | '\U0000A4E0', '\U00010513', '\U0000019D']
138 |
139 | confusables['O'] = ['\U00000A66', '\U00000AE6', '\U00000BE6', '\U00000C66', '\U00000CE6', '\U00000ED0',
140 | '\U00001040',
141 | '\U00000030', '\U000007C0', '\U000009E6', '\U00000B66', '\U00003007', '\U000114D0',
142 | '\U000118E0',
143 | '\U0001D7CE', '\U0001D7D8', '\U0001D7E2', '\U0001D7EC', '\U0001D7F6', '\U0000FF2F',
144 | '\U0001D40E',
145 | '\U0001D442', '\U0001D476', '\U0001D4AA', '\U0001D4DE', '\U0001D512', '\U0001D546',
146 | '\U0001D57A',
147 | '\U0001D5AE', '\U0001D5E2', '\U0001D616', '\U0001D64A', '\U0001D67E', '\U0000039F',
148 | '\U0001D6B6',
149 | '\U0001D6F0', '\U0001D72A', '\U0001D764', '\U0001D79E', '\U00002C9E', '\U0000041E',
150 | '\U00000555',
151 | '\U00002D54', '\U00000B20', '\U00000D20', '\U0000A4F3', '\U000118B5', '\U00010292',
152 | '\U000102AB',
153 | '\U00010404', '\U00010516', '\U000001D1', '\U000000D8', '\U00002D41', '\U000001FE',
154 | '\U00002296',
155 | '\U0000229D', '\U0001F100', '\U0001F101', '\U000001A0', '\U000013A4']
156 |
157 | confusables['P'] = ['\U0000FF30', '\U00002119', '\U0001D40F', '\U0001D443', '\U0001D477', '\U0001D4AB',
158 | '\U0001D4DF',
159 | '\U0001D513', '\U0001D57B', '\U0001D5AF', '\U0001D5E3', '\U0001D617', '\U0001D64B',
160 | '\U0001D67F',
161 | '\U000003A1', '\U0001D6B8', '\U0001D6F2', '\U0001D72C', '\U0001D766', '\U0001D7A0',
162 | '\U00002CA2',
163 | '\U00000420', '\U000013E2', '\U0000146D', '\U0000A4D1', '\U00010295', '\U00001477',
164 | '\U00001486', ]
165 |
166 | confusables['Q'] = ['\U0000211A', '\U0001D410', '\U0001D444', '\U0001D478', '\U0001D4AC', '\U0001D4E0',
167 | '\U0001D514',
168 | '\U0001D57C', '\U0001D5B0', '\U0001D5E4', '\U0001D618', '\U0001D64C', '\U0001D680',
169 | '\U00002D55']
170 |
171 | confusables['R'] = ['\U0000211B', '\U0000211C', '\U0000211D', '\U0001D411', '\U0001D445', '\U0001D479',
172 | '\U0001D4E1',
173 | '\U0001D57D', '\U0001D5B1', '\U0001D5E5', '\U0001D619', '\U0001D64D', '\U0001D681',
174 | '\U000001A6',
175 | '\U000013A1', '\U000013D2', '\U00001587', '\U0000A4E3']
176 |
177 | confusables['S'] = ['\U0000FF33', '\U0001D412', '\U0001D446', '\U0001D47A', '\U0001D4AE', '\U0001D4E2',
178 | '\U0001D516',
179 | '\U0001D54A', '\U0001D57E', '\U0001D5B2', '\U0001D5E6', '\U0001D61A', '\U0001D64E',
180 | '\U0001D682',
181 | '\U00000405', '\U0000054F', '\U000013D5', '\U000013DA', '\U0000A4E2', '\U00010296',
182 | '\U00010420']
183 |
184 | confusables['T'] = ['\U000022A4', '\U000027D9', '\U0001F768', '\U0000FF34', '\U0001D413', '\U0001D447',
185 | '\U0001D47B',
186 | '\U0001D4AF', '\U0001D4E3', '\U0001D517', '\U0001D548', '\U0001D57F', '\U0001D5B3',
187 | '\U0001D5E7',
188 | '\U0001D61B', '\U0001D64F', '\U0001D683', '\U000003A4', '\U0001D6BB', '\U0001D6F5',
189 | '\U0001D72F',
190 | '\U0001D769', '\U0001D7A3', '\U00002CA6', '\U00000422', '\U000013A2', '\U0000A4D4',
191 | '\U000118BC',
192 | '\U00010297', '\U000102B1', '\U00010315', '\U00002361', '\U0000023E', '\U0000021A',
193 | '\U000001AE',
194 | '\U000004AC', '\U000020AE', '\U00000166']
195 |
196 | confusables['U'] = ['\U0000222A', '\U000022C3', '\U0001D414', '\U0001D448', '\U0001D47C', '\U0001D4B0',
197 | '\U0001D4E4',
198 | '\U0001D518', '\U0001D54C', '\U0001D580', '\U0001D5B4', '\U0001D5E8', '\U0001D61C',
199 | '\U0001D650',
200 | '\U0001D684', '\U0000054D', '\U0000144C', '\U0000A4F4', '\U000118B8', '\U000001D3',
201 | '\U00000244',
202 | '\U000013CC', '\U00001458', '\U00001467', '\U000001B1', '\U0000162E']
203 |
204 | confusables['V'] = ['\U00002228', '\U000022C1', '\U00000667', '\U000006F7', '\U00002164', '\U0001D415',
205 | '\U0001D449',
206 | '\U0001D47D', '\U0001D4B1', '\U0001D4E5', '\U0001D519', '\U0001D54D', '\U0001D581',
207 | '\U0001D5B5',
208 | '\U0001D5E9', '\U0001D61D', '\U0001D651', '\U0001D685', '\U00000474', '\U00002D38',
209 | '\U000013D9',
210 | '\U0000142F', '\U0000A4E6', '\U000118A0', '\U0001051D', '\U0000143B', '\U0001F708']
211 |
212 | confusables['W'] = ['\U000118EF', '\U000118E6', '\U0001D416', '\U0001D44A', '\U0001D47E', '\U0001D4B2',
213 | '\U0001D4E6',
214 | '\U0001D51A', '\U0001D54E', '\U0001D582', '\U0001D5B6', '\U0001D5EA', '\U0001D61E',
215 | '\U0001D652',
216 | '\U0001D686', '\U0000051C', '\U000013B3', '\U000013D4', '\U0000A4EA', '\U000020A9']
217 |
218 | confusables['X'] = ['\U0000166D', '\U00002573', '\U00010322', '\U000118EC', '\U0000FF38', '\U00002169',
219 | '\U0001D417',
220 | '\U0001D44B', '\U0001D47F', '\U0001D4B3', '\U0001D4E7', '\U0001D51B', '\U0001D54F',
221 | '\U0001D583',
222 | '\U0001D5B7', '\U0001D5EB', '\U0001D61F', '\U0001D653', '\U0001D687', '\U000003A7',
223 | '\U0001D6BE',
224 | '\U0001D6F8', '\U0001D732', '\U0001D76C', '\U0001D7A6', '\U00002CAC', '\U00000425',
225 | '\U00002D5D',
226 | '\U00002D5D', '\U000016B7', '\U0000A4EB', '\U00010290', '\U000102B4', '\U00010317',
227 | '\U00010527',
228 | '\U0000A7B3', '\U000004B2']
229 |
230 | confusables['Y'] = ['\U0000FF39', '\U0001D418', '\U0001D44C', '\U0001D480', '\U0001D4B4', '\U0001D4E8',
231 | '\U0001D51C',
232 | '\U0001D550', '\U0001D584', '\U0001D5B8', '\U0001D5EC', '\U0001D620', '\U0001D654',
233 | '\U0001D688',
234 | '\U000003A5', '\U000003D2', '\U0001D6BC', '\U0001D6F6', '\U0001D730', '\U0001D76A',
235 | '\U0001D7A4',
236 | '\U00002CA8', '\U000004AE', '\U000013A9', '\U000013BD', '\U0000A4EC', '\U000118A4',
237 | '\U000102B2',
238 | '\U000000A5', '\U0000024E', '\U000004B0']
239 |
240 | confusables['Z'] = ['\U000102F5', '\U000118E5', '\U0000FF3A', '\U00002124', '\U00002128', '\U0001D419',
241 | '\U0001D44D',
242 | '\U0001D481', '\U0001D4B5', '\U0001D4E9', '\U0001D585', '\U0001D5B9', '\U0001D5ED',
243 | '\U0001D621',
244 | '\U0001D655', '\U0001D689', '\U00000396', '\U0001D6AD', '\U0001D6E7', '\U0001D721',
245 | '\U0001D75B',
246 | '\U0001D795', '\U000013C3', '\U0000A4DC', '\U000118A9', '\U000001B5', '\U00000224']
247 |
248 | confusables['a'] = ['\U0000237a', '\U0000FF41', '\U0001D41A', '\U0001D44E', '\U0001D482', '\U0001D4B6',
249 | '\U0001D4EA', '\U0001D51E', '\U0001D552', '\U0001D586', '\U0001D5BA', '\U0001D5EE',
250 | '\U0001D622', '\U0001D656', '\U0001D68A', '\U00000251', '\U000003B1', '\U0001D6C2',
251 | '\U0001D6FC',
252 | '\U0001D736', '\U0001D770', '\U0001D7AA', '\U00000430', '\U00002376', '\U00000103',
253 | '\U000001CE',
254 | '\U00000227', '\U000000E5', '\U00001E9A', '\U00001EA3']
255 |
256 | confusables['b'] = ['\U0001D41B', '\U0001D44F', '\U0001D483', '\U0001D4B7', '\U0001D4EB', '\U0001D51F',
257 | '\U0001D553', '\U0001D587', '\U0001D5BB', '\U0001D5EF', '\U0001D623', '\U0001D657',
258 | '\U0001D68B', '\U00000184', '\U0000042C', '\U000013CF', '\U000015AF', '\U00000253',
259 | '\U00000183',
260 | '\U00000411', '\U00000182', '\U00000180', '\U0000048C', '\U0000048D', '\U00000462',
261 | '\U00000463']
262 |
263 | confusables['c'] = ['\U0000FF43', '\U0000217D', '\U0001D41C', '\U0001D450', '\U0001D484', '\U0001D4B8',
264 | '\U0001D4EC', '\U0001D520', '\U0001D554', '\U0001D588', '\U0001D5BC', '\U0001D5F0',
265 | '\U0001D624', '\U0001D658', '\U0001D68C', '\U00001D04', '\U000003F2', '\U00002CA5',
266 | '\U00000441',
267 | '\U0001043D', '\U000000A2', '\U0000023C', '\U000000E7', '\U000004AB']
268 |
269 | confusables['d'] = ['\U0000217E', '\U00002146', '\U0001D41D', '\U0001D451', '\U0001D485', '\U0001D4B9',
270 | '\U0001D4ED', '\U0001D521', '\U0001D555', '\U0001D589', '\U0001D5BD', '\U0001D5F1',
271 | '\U0001D625', '\U0001D659', '\U0001D68D', '\U00000501', '\U000013E7', '\U0000146F',
272 | '\U0000A4D2',
273 | '\U00000257', '\U00000256', '\U00000018', '\U00000111', '\U000020AB', '\U0000147B',
274 | '\U00001487']
275 |
276 | confusables['e'] = ['\U0000212E', '\U0000FF45', '\U0000212F', '\U00002147', '\U0001D41E', '\U0001D452',
277 | '\U0001D486', '\U0001D4EE', '\U0001D522', '\U0001D556', '\U0001D58A', '\U0001D5BE',
278 | '\U0001D5F2', '\U0001D626', '\U0001D65A', '\U0001D68E', '\U0000AB32', '\U00000435',
279 | '\U000004BD',
280 | '\U0000011B', '\U00000115', '\U00000247', '\U000004BF', '\U000000E9']
281 |
282 | confusables['f'] = ['\U0001D41F', '\U0001D453', '\U0001D487', '\U0001D4BB', '\U0001D4EF', '\U0001D523',
283 | '\U0001D557', '\U0001D58B', '\U0001D5BF', '\U0001D5F3', '\U0001D627', '\U0001D65B',
284 | '\U0001D68F', '\U0000AB35', '\U0000A799', '\U0000017F', '\U00001E9D', '\U00000584',
285 | '\U00000192',
286 | '\U0000196E']
287 |
288 | confusables['g'] = ['\U0000FF47', '\U0000210A', '\U0001D420', '\U0001D454', '\U0001D488', '\U0001D4F0',
289 | '\U0001D524', '\U0001D558', '\U0001D58C', '\U0001D5C0', '\U0001D5F4', '\U0001D628',
290 | '\U0001D65C', '\U0001D690', '\U00000261', '\U00001D83', '\U0000018D', '\U00000581',
291 | '\U00000260',
292 | '\U000001E7', '\U000001F5', '\U000001E5']
293 |
294 | confusables['h'] = ['\U0000FF48', '\U0000210E', '\U0001D421', '\U0001D489', '\U0001D4BD', '\U0001D4F1',
295 | '\U0001D525', '\U0001D559', '\U0001D58D', '\U0001D5C1', '\U0001D5F5', '\U0001D629',
296 | '\U0001D65D', '\U0001D691', '\U000004BB', '\U00000570', '\U000013C2', '\U00000266',
297 | '\U0000A695',
298 | '\U000013F2', '\U00000127', '\U0000210F', '\U0000045B']
299 |
300 | confusables['i'] = ['\U000002DB', '\U00002373', '\U0000FF49', '\U00002170', '\U00002139', '\U00002148',
301 | '\U0001D422', '\U0001D456', '\U0001D48A', '\U0001D4BE', '\U0001D4F2', '\U0001D526',
302 | '\U0001D55A', '\U0001D58E', '\U0001D5C2', '\U0001D5F6', '\U0001D62A', '\U0001D65E',
303 | '\U0001D692', '\U00000131', '\U0001D6A4', '\U0000026A', '\U00000269', '\U000003B9',
304 | '\U00001FBE',
305 | '\U0000037A', '\U0001D6CA', '\U0001D704', '\U0001D73E', '\U0001D778', '\U0001D7B2',
306 | '\U00000456',
307 | '\U0000A647', '\U000004CF', '\U000013A5', '\U000118C3', '\U00002378', '\U000001D0',
308 | '\U00000268',
309 | '\U00001D7C']
310 |
311 | confusables['j'] = ['\U0000FF4A', '\U00002149', '\U0001D423', '\U0001D457', '\U0001D48B', '\U0001D4BF',
312 | '\U0001D4F3', '\U0001D527', '\U0001D55B', '\U0001D58F', '\U0001D5C3', '\U0001D5F7',
313 | '\U0001D62B', '\U0001D65F', '\U0001D693', '\U000003F3', '\U00000458', '\U00000249',
314 | '\U0001D6A5',
315 | '\U00000237', '\U00000575']
316 |
317 | confusables['k'] = ['\U0001D424', '\U0000FF4B', '\U0001D458', '\U0001D48C', '\U0001D4C0', '\U0001D4F4',
318 | '\U0001D528', '\U0001D55C', '\U0001D590', '\U0001D5C4', '\U0001D4F8', '\U0001D62C',
319 | '\U0001D660', '\U0001D694', '\U00001D0B', '\U00000138', '\U000003BA', '\U000003F0',
320 | '\U0001D6CB',
321 | '\U0001D6DE', '\U0001D705', '\U0001D718', '\U0001D73F', '\U0001D752', '\U0001D779',
322 | '\U0001D78C', '\U0001D7B3', '\U0001D7C6', '\U00002C95', '\U0000043A', '\U00000199',
323 | '\U0000049B']
324 |
325 | confusables['l'] = ['\U0000FF4C', '\U000005C0', '\U0000007C', '\U00002223', '\U0000FFE8', '\U00000031',
326 | '\U00000661', '\U000006F1', '\U00010320', '\U0001E8C7', '\U0001D7CF', '\U0001D7D9',
327 | '\U0001D7F7', '\U00000049', '\U0000FF29', '\U00002160', '\U00002110', '\U00002111',
328 | '\U0001D408',
329 | '\U0001D43C', '\U0001D470', '\U0001D4D8', '\U0001D540', '\U0001D574', '\U0001D5A8',
330 | '\U0001D5DC', '\U0001D610', '\U0001D644', '\U0001D678', '\U00000196', '\U0000217C',
331 | '\U00002113',
332 | '\U0001D425', '\U0001D459', '\U0001D48D', '\U0001D4C1', '\U0001D4F5', '\U0001D529',
333 | '\U0001D55D', '\U0001D591', '\U0001D5C5', '\U0001D5F9', '\U0001D62D', '\U0001D661',
334 | '\U0001D695', '\U000001C0', '\U00000399', '\U0001D6B0', '\U0001D6EA', '\U0001D724',
335 | '\U0001D75E',
336 | '\U0001D798', '\U00002C92', '\U00000406', '\U000004C0', '\U000005D5', '\U000005DF',
337 | '\U00000627',
338 | '\U0001EE00', '\U0001EE80', '\U0000FE8E', '\U0000FE8D', '\U000007CA', '\U00002D4F',
339 | '\U000016C1',
340 | '\U0000A4F2', '\U0001028A', '\U00010309', '\U00000142', '\U0000026D', '\U0000019A',
341 | '\U0000026B',
342 | '\U00000625', '\U0000FE88', '\U0000FE87', '\U00000673', '\U00002488', '\U00000623',
343 | '\U0000FE84',
344 | '\U0000FE83', '\U00000672', '\U00000675']
345 |
346 | confusables['m'] = ['\U00011700', '\U0000FF4D', '\U0001D48E', '\U0001D62E', '\U000118E3', '\U0001D592',
347 | '\U0001D426', '\U0001D5C6', '\U0001D52A', '\U0001D55E', '\U0001D4C2', '\U0001D662',
348 | '\U0001D4F6', '\U0001D696', '\U0001D45A', '\U0001D5FA', '\U0000217F']
349 |
350 | confusables['n'] = ['\U0000FF4E', '\U0001D427', '\U0001D45B', '\U0001D48F', '\U0001D4C3', '\U0001D4F7',
351 | '\U0001D52B', '\U0001D55F', '\U0001D593', '\U0001D5C7', '\U0001D5FB', '\U0001D62F',
352 | '\U0001D663', '\U0001D697', '\U000003C0', '\U000003D6', '\U0000213C', '\U0001D6D1',
353 | '\U0001D6E1',
354 | '\U0001D70B', '\U0001D71B', '\U0001D745', '\U0001D755', '\U0001D77F', '\U0001D78F',
355 | '\U0001D7B9', '\U0001D7C9', '\U00001D28', '\U0000043F', '\U00000578', '\U0000057C',
356 | '\U00000273',
357 | '\U0000019E', '\U000003B7', '\U0001D6C8', '\U0001D702', '\U0001D73C', '\U0001D776',
358 | '\U0001D7B0',
359 | '\U00001D70', '\U00000146', '\U00000272', '\U0000014B']
360 |
361 | confusables['o'] = ['\U00000C02', '\U00000C82', '\U00000D02', '\U00000D82', '\U00000966', '\U00000A66',
362 | '\U00000AE6', '\U00000BE6', '\U00000C66', '\U00000CE6', '\U00000D66', '\U00000E50',
363 | '\U00000ED0',
364 | '\U00001040', '\U0000FF4F', '\U00002134', '\U0001D428', '\U0001D45C', '\U0001D490',
365 | '\U0001D4F8',
366 | '\U0001D52C', '\U0001D490', '\U0001D4F8', '\U0001D52C', '\U0001D560', '\U0001D594',
367 | '\U0001D5C8', '\U0001D5FC', '\U0001D630', '\U0001D664', '\U0001D698', '\U00001D0F',
368 | '\U00001D11',
369 | '\U0000AB3D', '\U000003BF', '\U0001D6D0', '\U0001D70A', '\U0001D744', '\U0001D77E',
370 | '\U0001D7B8',
371 | '\U000003C3', '\U0001D6D4', '\U0001D70E', '\U0001D748', '\U0001D782', '\U0001D7BC',
372 | '\U00002C9F',
373 | '\U0000043E', '\U000010FF', '\U00005085', '\U000005E1', '\U00000647', '\U0001EE24',
374 | '\U0001EE64',
375 | '\U0001EE84', '\U0000FEEB', '\U0000FEEC', '\U0000FEEA', '\U0000FEE9', '\U000006BE',
376 | '\U0000FBAC',
377 | '\U0000FBAD', '\U0000FBAB', '\U0000FBAA', '\U000006C1', '\U0000FBA8', '\U0000FBA9',
378 | '\U0000FBA7',
379 | '\U0000FBA6', '\U000006D5', '\U0000101D', '\U000118C8', '\U000118D7', '\U0001042C',
380 | '\U000007C0',
381 | '\U000009E6', '\U000001D2', '\U000000F8', '\U0000AB3E', '\U00000275', '\U0000A74B',
382 | '\U000004E9',
383 | '\U00000473', '\U00002296', '\U0000229D', '\U0000FCD9', '\U000001A1']
384 |
385 | confusables['p'] = ['\U00002374', '\U0000FF50', '\U0001D429', '\U0001D45D', '\U0001D491', '\U0001D4C5',
386 | '\U0001D4F9', '\U0001D52D', '\U0001D561', '\U0001D595', '\U0001D5C9', '\U0001D5FD',
387 | '\U0001D631', '\U0001D665', '\U0001D699', '\U000003C1', '\U000003F1', '\U0001D6D2',
388 | '\U0001D6E0',
389 | '\U0001D70C', '\U0001D71A', '\U0001D746', '\U0001D754', '\U0001D780', '\U0001D78E',
390 | '\U0001D7BA', '\U0001D7C8', '\U00002CA3', '\U00000440', '\U000001A5', '\U00001D7D']
391 |
392 | confusables['q'] = ['\U0001D42A', '\U0001D45E', '\U0000FF51', '\U0001D492', '\U0001D4C6', '\U0001D4FA',
393 | '\U0001D52E', '\U0001D562', '\U0001D596', '\U0001D5CA', '\U0001D5FE', '\U0001D632',
394 | '\U0001D666', '\U0001D69A', '\U0000051B', '\U00000563', '\U00000566', '\U000002A0',
395 | '\U00001D90',
396 | '\U0000024B']
397 |
398 | confusables['r'] = ['\U0001D42B', '\U0000FF52', '\U0001D45F', '\U0001D493', '\U0001D4C7', '\U0001D4FB',
399 | '\U0001D52F', '\U0001D563', '\U0001D597', '\U0001D5CB', '\U0001D5FF', '\U0001D633',
400 | '\U0001D667', '\U0001D69B', '\U0000AB47', '\U0000AB48', '\U00001D26', '\U00002C85',
401 | '\U00000433',
402 | '\U0000027D', '\U0000027C', '\U0000024D', '\U00000493', '\U00001D72', '\U00000491']
403 |
404 | confusables['s'] = ['\U0000FF53', '\U0001D42C', '\U0001D460', '\U0001D494', '\U0001D4C8', '\U0001D4FC',
405 | '\U0001D530', '\U0001D564', '\U0001D598', '\U0001D5CC', '\U0001D600', '\U0001D634',
406 | '\U0001D668', '\U0001D69C', '\U0000A731', '\U000001BD', '\U00000455', '\U000118C1',
407 | '\U00010448',
408 | '\U00000282', '\U00001D74']
409 |
410 | confusables['t'] = ['\U0000FF54', '\U0001D42D', '\U0001D461', '\U0001D495', '\U0001D4C9', '\U0001D4FD',
411 | '\U0001D531', '\U0001D565', '\U0001D599', '\U0001D5CD', '\U0001D601', '\U0001D635',
412 | '\U0001D669', '\U0001D69D', '\U00001D1B', '\U000003C4', '\U0001D6D5', '\U0001D70F',
413 | '\U0001D749',
414 | '\U0001D783', '\U0001D7BD', '\U00000442', '\U000001AD', '\U000004AD', '\U00000167',
415 | '\U00000163',
416 | '\U0000021b']
417 |
418 | confusables['u'] = ['\U0000FF55', '\U0001D42E', '\U0001D462', '\U0001D496', '\U0001D4CA', '\U0001D4FE',
419 | '\U0001D532', '\U0001D566', '\U0001D59A', '\U0001D5CE', '\U0001D602', '\U0001D636',
420 | '\U0001D66A', '\U0001D69E', '\U0000A79F', '\U00001D1C', '\U0000AB4E', '\U00001B52',
421 | '\U0000028B',
422 | '\U000003C5', '\U0001D6D6', '\U0001D710', '\U0001D74A', '\U0001D784', '\U0001D7BE',
423 | '\U00000446',
424 | '\U0000057D', '\U000118D8', '\U000001D4', '\U0000197E', '\U0000028A']
425 |
426 | confusables['v'] = ['\U00002228', '\U000022C1', '\U0000FF56', '\U00002174', '\U0001D42F', '\U0001D463',
427 | '\U0001D497', '\U0001D4CB', '\U0001D4FF', '\U0001D533', '\U0001D567', '\U0001D59B',
428 | '\U0001D5CF', '\U0001D603', '\U0001D637', '\U0001D66B', '\U0001D69F', '\U00001D20',
429 | '\U000003BD',
430 | '\U0001D6CE', '\U0001D708', '\U0001D742', '\U0001D77C', '\U0001D7B6', '\U00000475',
431 | '\U000005DB',
432 | '\U000118C0']
433 |
434 | confusables['w'] = ['\U0000FF57', '\U0001D430', '\U0001D5D0', '\U00001D21', '\U00000461', '\U00000561',
435 | '\U0000AB83', '\U0001D534', '\U0001D568', '\U0001D4CC', '\U0001D66C', '\U0000026F',
436 | '\U0001D500',
437 | '\U0001D6A0', '\U0001170F', '\U0001170E', '\U0001D464', '\U0001D604', '\U0001D498',
438 | '\U0001D638', '\U0001D59C', '\U0000051D', '\U0001170A']
439 |
440 | confusables['x'] = ['\U0000166E', '\U000000D7', '\U0000292B', '\U0000292C', '\U00002A2F', '\U0000FF58',
441 | '\U00002179', '\U0001D431', '\U0001D465', '\U0001D499', '\U0001D4CD', '\U0001D501',
442 | '\U0001D535', '\U0001D569', '\U0001D59D', '\U0001D5D1', '\U0001D605', '\U0001D639',
443 | '\U0001D66D', '\U0001D6A1', '\U00000445', '\U00001541', '\U0000157D', '\U00002A30']
444 |
445 | confusables['y'] = ['\U000002C3', '\U00001D8C', '\U0000FF59', '\U0001D432', '\U0001D466', '\U0001D49A',
446 | '\U0001D4CE', '\U0001D502', '\U0001D536', '\U0001D56A', '\U0001D59E', '\U0001D5D2',
447 | '\U0001D606', '\U0001D63A', '\U0001D66E', '\U0001D6A2', '\U0000028F', '\U00001EFF',
448 | '\U0000AB5A',
449 | '\U000003B3', '\U0000213D', '\U0001D6C4', '\U0001D6FE', '\U0001D738', '\U0001D772',
450 | '\U0001D7AC',
451 | '\U00000443', '\U000004AF', '\U000010E7', '\U000118DC', '\U000001B4', '\U0000024F',
452 | '\U000004B1']
453 |
454 | confusables['z'] = ['\U0001D433', '\U0000FF5A', '\U0001D467', '\U0001D49B', '\U0001D4CF', '\U0001D503',
455 | '\U0001D537', '\U0001D56B', '\U0001D59F', '\U0001D5D3', '\U0001D607', '\U0001D63B',
456 | '\U0001D66F', '\U0001D6A3', '\U00001D22', '\U000118C4', '\U00000290', '\U000001B6',
457 | '\U00000225',
458 | '\U00001D76']
459 |
460 | return confusables
461 |
462 |
463 | def get_homograph(input):
464 | confusables = get_confusables()
465 | output = ''
466 | for input_char in input:
467 | if input_char in confusables:
468 | next_confusables = confusables[input_char]
469 | selected_char = random.randint(0, len(input_char))
470 | output += next_confusables[selected_char]
471 | else:
472 | output += input_char
473 |
474 | return output
475 |
476 |
477 | def expand(homograph, reverse_confusables, current, results, ignore_case=True):
478 | if len(homograph) == 0:
479 | if ignore_case is True:
480 | current = current.lower()
481 | results.add(current)
482 | else:
483 | if ord(homograph[0]) in reverse_confusables:
484 | for j in reverse_confusables[ord(homograph[0])]:
485 | expand(homograph[1:], reverse_confusables, current + j, results, ignore_case)
486 | else:
487 | expand(homograph[1:], reverse_confusables, current + homograph[0], results, ignore_case)
488 |
489 |
490 | def convert_to_ascii(homograph, ignore_case=True):
491 | confusables = get_confusables()
492 | reverse_confusables = {}
493 | for i in confusables:
494 | for j in confusables[i]:
495 | if ord(j) not in reverse_confusables:
496 | reverse_confusables[ord(j)] = set()
497 |
498 | if ord(j) < 128:
499 | reverse_confusables[ord(j)].add(j)
500 | if ignore_case is True:
501 | i = i.lower()
502 | reverse_confusables[ord(j)].add(i)
503 |
504 | results = set()
505 | expand(homograph, reverse_confusables, '', results, ignore_case)
506 | return results
507 |
508 |
509 | def generate_table():
510 | confusables = get_confusables()
511 | output = "
\n"
512 |
513 | for i in confusables:
514 | output += "\t\n\t\t\n".format(i)
515 | for j in confusables[i]:
516 | output += "- {}
".format(i, 'html code: &#' + str(ord(j)),
517 | '' + str(ord(j)))
518 |
519 | output += "\n\t\t | \n\t
\n"
520 | output += "\n
"
521 |
522 | return output
523 |
--------------------------------------------------------------------------------
/mappings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
298 |
299 |
361 |
362 |
--------------------------------------------------------------------------------