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_c3(code)
2. stringprep.in_table_c4(code)
1. stringprep.in_table_c3(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.3.
This Table C.3 contains the Private Use characters.
Private Use characters are assigned Unicode code points whose interpretation is not specified by this standard and whose use may be determined by private agreement among cooperating users. These characters are designated for private use and do not have defined, interpretable semantics except by private agreement.
Private Use characters do not have any meanings assigned by the Unicode standard, but are intended to be interchanged among the cooperating parties, who share conventions about what the private use characters mean using some kind of public documentation about such use.
To view the table visit: https://datatracker.ietf.org/doc/html/rfc3454#appendix-C.3
EXAMPLE:
2. stringprep.in_table_c4(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.4.
This Table C.4 contains the Non character code points.
A 'noncharacter' is a code point that is permanently reserved in the Unicode Standard for internal use.
There are exactly 66 noncharacters in Unicode. The set of non-characters are formally immutable as guaranteed by the Unicode Stability Policy.
To view the table visit: https://datatracker.ietf.org/doc/html/rfc3454#appendix-C.4
EXAMPLE:
Comments