Python Unicode Gotchas

Use when handling Python text encoding — UnicodeDecodeError/EncodeError, mojibake, filesystem names with non-UTF-8 bytes, combining-character mismatches, case-insensitive string compare, regex \w/\d unexpected behavior, or round-tripping unknown-encoding files; covers error handlers (surrogateescape, backslashreplace), normalization (NFC/NFD/NFKC/NFKD), BOM handling, and open()'s encoding vs errors

narenaryan 132600c 3.7 KB Updated

File contents

narenaryan/agent-skills/tree/main/skills/python/python-unicode-gotchas commit 132600c02e

Frequently asked questions

npx skillmds@latest add narenaryan/python-unicode-gotchas