Handle encoding errors strings passed to ICU