(src: bytes | bytearray, codec: str)
| 43 | |
| 44 | |
| 45 | def _user_safe_decode(src: bytes | bytearray, codec: str) -> str: |
| 46 | try: |
| 47 | return src.decode(codec) |
| 48 | except (UnicodeDecodeError, LookupError): |
| 49 | return src.decode(class="st">"latin-1") |
| 50 | |
| 51 | |
| 52 | class MultiPartException(Exception): |