UnicodeEncodeError/surrogates not allowed when comparing filenames with unusual encodings
When comparing dirs with unusual filename encodings, I get the following error:
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf1' in position 64: surrogates not allowed
Directory comparison then appears to end, the tree doesn't expand to show differences, and when I manually open the tree, many dirs appear empty presumably because comparison stopped early. The problem directory contains:
-rw------- 1 pryan pryan 362 Jan 1 1970 'Ma'$'\361''anaDB.pdb'
-rw------- 1 pryan pryan 362 Jan 1 1970 MananaDB.pdb
I experienced this problem on Ubuntu 18.04.1 using Meld 3.18.0, and I have since tested and experienced the same issue with Meld 3.18.2
(Not important, but I did wonder if the filename was the result of file corruption; turns out it was an intentional name part of the jPilot project but has since changed that file to use safer ASCII characters as mentioned here: http://jpilot.org/blog/release-1.8.2/)