Fix unicode and date handling. re #1038