When trying to output directory names on a Mac
プ ロシ゛ ェクト
If it ends up looking like this, you can fix it by using
import unicodedata
unicodedata.normalize('NFC', folder_name)
You can correct it with the built-in unicodedata module.
This process is called converting from NFD normalization to NFC normalization of Unicode.
Reference: Handling Unicode normalization NFC/NFD strings in Python - forest book
Comments