Improvements on locale/encoding issues.