Fixes to character encoding.