Ulli Horlacher writes: > Steven D'Aprano wrote: > >> >> The limitation is that this will not work if any of the file names >> >> contain astral (non-BMP) chars because tk cannot handle such >> >> characters. >> > >> > What are "astral chars"? >> >> Unicode characters beyond U+FFFF. > > I see, for very exotic character sets, like Klingon, etc :-) > In my case, I can simple ignore them.
Better test how your user interface behaves when a user copy-pastes one of those characters into it. If it merely garbles the character somehow, you may be able to ignore the problem, but if it promptly shuts down your whole application and loses some unfinished work, the user may not be happy. Klingon may not be that widely spoken, but all manner of little picture characters seem popular. Wasn't one just chosen to be the Word Of The Year? And when it's the underlying GUI library that crashes, it's too late for your program to sanitize the input. -- https://mail.python.org/mailman/listinfo/python-list