better support for non-standard charsets