Safer printing on non-utf-8 locales