None
(unistr, errors="strict")
| 216 | |
| 217 | |
| 218 | def unicode_internal_decode(unistr, errors="strict"): |
| 219 | """None""" |
| 220 | if type(unistr) == str: |
| 221 | return unistr, len(unistr) |
| 222 | else: |
| 223 | p = [] |
| 224 | i = 0 |
| 225 | if sys.byteorder == "big": |
| 226 | start = unicode_bytes - 1 |
| 227 | stop = -1 |
| 228 | step = -1 |
| 229 | else: |
| 230 | start = 0 |
| 231 | stop = unicode_bytes |
| 232 | step = 1 |
| 233 | while i < len(unistr) - unicode_bytes + 1: |
| 234 | t = 0 |
| 235 | h = 0 |
| 236 | for j in range(start, stop, step): |
| 237 | t += ord(unistr[i + j]) << (h * 8) |
| 238 | h += 1 |
| 239 | i += unicode_bytes |
| 240 | p += chr(t) |
| 241 | res = "".join(p) |
| 242 | return res, len(res) |
| 243 | |
| 244 | |
| 245 | def utf_16_ex_decode(data, errors="strict", byteorder=0, final=0): |