I have non-BMP characters appearing frequently in the text I'm trying to print, which is causing many errors like this in my IDLE window:
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 18-18: Non-BMP character not supported in Tk
I would like to parse the text before printing it, find these characters, and replace them with \uFFFD
(�) so that the python program doesn't crash, and also returns something so I, the user, can see that a non-BMP character was there.