Fix #45: Convert strings to local encoding before printing