My epiphany was using find | xargs and realizing I need -print0 for the former and -0 for the latter to handle special characters. Then I realized all my previous bash scripts were WRONG...
xargs -0
find ... -print0
sort -z
while IFS= read -r -d '' var; do ...; done
env -0
printf -- '%s\0' *