Issue #2730207 by MegaChriz, twistor: Correction for the fix to log items that are not UTF-8-encoded.