in reply to How to handle encoding for STDERR
I am suspicious of a bug, or possibly of bad-data from wherever this stuff is coming from. Don't try to "code around it" ... find the true root cause of what's going on here. Red flags abound, demanding explanation.