Python, Locales and Writing Systems
summary
Python 3 uses Unicode strings by default but specific behaviors bite: Turkish dotted/dotless I breaks upper()/lower() under locale-aware case maps — workable fixes are importing PyICU or replacing characters with a str.translate table. Right‑to‑left scripts need shaping and reordering — use python-bidi display() and an Arabic reshaper (Android‑ported library) to get correct glyph forms. East Asian half/fullwidth glyphs convert with jaconv; Unicode normalization (NFD/NFC/NFKD/NFKC) affects Hangul composition and terminal column width. Beware multi‑byte escapes (0x5c) that enable SQL injection and past bidi URL spoofing now patched.
AI-written summary · about
chapters (12)
- 0:00Introduction and welcome
- 1:06Python 3 and Unicode by default
- 4:20Turkish locale issues in Python
- 7:14Right-to-left writing systems
- 9:24Arabic letter shaping in text
- 11:35East Asian character widths
- 16:35Korean Hangul writing system
- 18:42Unicode character equivalence
- 23:40Security implications of Unicode
- 27:25Unicode in browser address bars
- 29:55Conclusion and takeaways
- 31:07Q&A session
