Lines Matching refs:errors
127 def decode_generalized_number(extended, extpos, bias, errors):
136 if errors == "strict":
144 elif errors == "strict":
157 def insertion_sort(base, extended, errors):
165 bias, errors)
173 if errors == "strict":
182 def punycode_decode(text, errors):
192 base = str(text[:pos], "ascii", errors)
194 return insertion_sort(base, extended, errors)
200 def encode(self, input, errors='strict'):
204 def decode(self, input, errors='strict'):
205 if errors not in ('strict', 'replace', 'ignore'):
206 raise UnicodeError("Unsupported error handling "+errors)
207 res = punycode_decode(input, errors)
216 if self.errors not in ('strict', 'replace', 'ignore'):
217 raise UnicodeError("Unsupported error handling "+self.errors)
218 return punycode_decode(input, self.errors)