Fix a bug: record encoding to UTF-8.
minor changes