Character encoding bug fixes, etc.