If we encounter a legacy non-Unicode file we now simply ignore the file instead of crashing. This fixes #4876. (cherry picked from commit 59c45c46)