Python Stringprep Library
Stringprep describes a framework for preparing Unicode text strings in order to increase the possibility that string input and string comparison work in ways that make sense for typical users throughout the world.
Some functions of stringprep discussed here are as follows:
1. stringprep.in_table_c11(code)
2. stringprep.in_table_c12(code)
3. stringprep.in_table_c11_c12(code)
1. stringprep.in_table_c11(code):
This function in python stringprep library returns "True" or "False" depending on whether the given Unicode code point passed as argument is listed in the Table C.1.1.
This Table C.1.1 contains the ASCII space characters.
This table has only one entry and that is for the space character " ".
To view the table visit: https://datatracker.ietf.org/doc/html/rfc3454#appendix-C.1.1
2. stringprep.in_table_c12(code):
This function in python stringprep library returns "True" or "False" depending on whether the given Unicode code point passed as argument is listed in the Table C.1.2.
This Table C.1.2 contains the Non-ASCII space characters.
This table has characters such as NO-BREAK SPACE, OGHAM SOACE MARK, FIGURE SPACE, etc.
To view the table visit: https://datatracker.ietf.org/doc/html/rfc3454#appendix-C.1.2
3. stringprep.in_table_c12(code):
This function in python stringprep library returns "True" or "False" depending on whether the given Unicode code point passed as argument is listed in the Table C.1.
This Table C.1 contains two tables for all the space characters whether it is ASCII or NON-ASCII.
It has two tables Table C.1.1 (that contains ASCII space characters) and Table C.1.2 (that contains Non-ASCII space characters).
To view the table visit: https://datatracker.ietf.org/doc/html/rfc3454#appendix-C.1
Comments