Fix for issues with non-ASCII charsets