How to detect Unicode characters outside the Basic Multilingual Plane
TL;DR def is_on_basic_multilingual_plane(char): return int(char.encode().hex(), 16) <= int("FFFF", 16) Backstory Recently, I was programmatically moving a few hundred thousand documents t...