Back to index

python3.2  3.2.2
Functions | Variables
stringprep Namespace Reference

Functions

def in_table_a1
def in_table_b1
def map_table_b3
def map_table_b2
def in_table_c11
def in_table_c12
def in_table_c11_c12
def in_table_c21
def in_table_c22
def in_table_c21_c22
def in_table_c3
def in_table_c4
def in_table_c5
def in_table_c6
def in_table_c7
def in_table_c8
def in_table_c9
def in_table_d1
def in_table_d2

Variables

tuple b1_set = set([173, 847, 6150, 6155, 6156, 6157, 8203, 8204, 8205, 8288, 65279] + list(range(65024,65040)))
dictionary b3_exceptions
tuple c22_specials = set([1757, 1807, 6158, 8204, 8205, 8232, 8233, 65279] + list(range(8288,8292)) + list(range(8298,8304)) + list(range(65529,65533)) + list(range(119155,119163)))
tuple c6_set = set(range(65529,65534))
tuple c7_set = set(range(12272,12284))
tuple c8_set = set([832, 833, 8206, 8207] + list(range(8234,8239)) + list(range(8298,8304)))
tuple c9_set = set([917505] + list(range(917536,917632)))

Function Documentation

def stringprep.in_table_a1 (   code)

Definition at line 12 of file stringprep.py.

00012 
00013 def in_table_a1(code):
00014     if unicodedata.category(code) != 'Cn': return False
00015     c = ord(code)
00016     if 0xFDD0 <= c < 0xFDF0: return False
00017     return (c & 0xFFFF) not in (0xFFFE, 0xFFFF)
00018 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_b1 (   code)

Definition at line 20 of file stringprep.py.

00020 
00021 def in_table_b1(code):
00022     return ord(code) in b1_set
00023 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c11 (   code)

Definition at line 206 of file stringprep.py.

00206 
00207 def in_table_c11(code):
00208     return code == " "
00209 

Here is the caller graph for this function:

Definition at line 213 of file stringprep.py.

00213 
00214 def in_table_c11_c12(code):
00215     return unicodedata.category(code) == "Zs"
00216 

Here is the caller graph for this function:

def stringprep.in_table_c12 (   code)

Definition at line 210 of file stringprep.py.

00210 
00211 def in_table_c12(code):
00212     return unicodedata.category(code) == "Zs" and code != " "

Here is the caller graph for this function:

def stringprep.in_table_c21 (   code)

Definition at line 217 of file stringprep.py.

00217 
00218 def in_table_c21(code):
00219     return ord(code) < 128 and unicodedata.category(code) == "Cc"

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 227 of file stringprep.py.

00227 
00228 def in_table_c21_c22(code):
00229     return unicodedata.category(code) == "Cc" or \
00230            ord(code) in c22_specials
00231 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c22 (   code)

Definition at line 221 of file stringprep.py.

00221 
00222 def in_table_c22(code):
00223     c = ord(code)
00224     if c < 128: return False
00225     if unicodedata.category(code) == "Cc": return True
00226     return c in c22_specials

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c3 (   code)

Definition at line 232 of file stringprep.py.

00232 
00233 def in_table_c3(code):
00234     return unicodedata.category(code) == "Co"
00235 

Here is the caller graph for this function:

def stringprep.in_table_c4 (   code)

Definition at line 236 of file stringprep.py.

00236 
00237 def in_table_c4(code):
00238     c = ord(code)
00239     if c < 0xFDD0: return False
00240     if c < 0xFDF0: return True
00241     return (ord(code) & 0xFFFF) in (0xFFFE, 0xFFFF)
00242 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c5 (   code)

Definition at line 243 of file stringprep.py.

00243 
00244 def in_table_c5(code):
00245     return unicodedata.category(code) == "Cs"
00246 

Here is the caller graph for this function:

def stringprep.in_table_c6 (   code)

Definition at line 248 of file stringprep.py.

00248 
00249 def in_table_c6(code):
00250     return ord(code) in c6_set
00251 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c7 (   code)

Definition at line 253 of file stringprep.py.

00253 
00254 def in_table_c7(code):
00255     return ord(code) in c7_set
00256 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c8 (   code)

Definition at line 258 of file stringprep.py.

00258 
00259 def in_table_c8(code):
00260     return ord(code) in c8_set
00261 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_c9 (   code)

Definition at line 263 of file stringprep.py.

00263 
00264 def in_table_c9(code):
00265     return ord(code) in c9_set
00266 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.in_table_d1 (   code)

Definition at line 267 of file stringprep.py.

00267 
00268 def in_table_d1(code):
00269     return unicodedata.bidirectional(code) in ("R","AL")
00270 

Here is the caller graph for this function:

def stringprep.in_table_d2 (   code)

Definition at line 271 of file stringprep.py.

00271 
00272 def in_table_d2(code):
00273     return unicodedata.bidirectional(code) == "L"

Here is the caller graph for this function:

Definition at line 195 of file stringprep.py.

00195 
00196 def map_table_b2(a):
00197     al = map_table_b3(a)
00198     b = unicodedata.normalize("NFKC", al)
00199     bl = "".join([map_table_b3(ch) for ch in b])
00200     c = unicodedata.normalize("NFKC", bl)
00201     if b != c:
00202         return c
00203     else:
00204         return al
00205 

Here is the call graph for this function:

Here is the caller graph for this function:

def stringprep.map_table_b3 (   code)

Definition at line 189 of file stringprep.py.

00189 
00190 def map_table_b3(code):
00191     r = b3_exceptions.get(ord(code))
00192     if r is not None: return r
00193     return code.lower()
00194 

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

tuple stringprep.b1_set = set([173, 847, 6150, 6155, 6156, 6157, 8203, 8204, 8205, 8288, 65279] + list(range(65024,65040)))

Definition at line 19 of file stringprep.py.

Definition at line 24 of file stringprep.py.

tuple stringprep.c22_specials = set([1757, 1807, 6158, 8204, 8205, 8232, 8233, 65279] + list(range(8288,8292)) + list(range(8298,8304)) + list(range(65529,65533)) + list(range(119155,119163)))

Definition at line 220 of file stringprep.py.

tuple stringprep.c6_set = set(range(65529,65534))

Definition at line 247 of file stringprep.py.

tuple stringprep.c7_set = set(range(12272,12284))

Definition at line 252 of file stringprep.py.

tuple stringprep.c8_set = set([832, 833, 8206, 8207] + list(range(8234,8239)) + list(range(8298,8304)))

Definition at line 257 of file stringprep.py.

tuple stringprep.c9_set = set([917505] + list(range(917536,917632)))

Definition at line 262 of file stringprep.py.