improve to_wide() to ignore UTF-8 errors