Changed (as in fixed) serialization and deserialization of utf8 string.
Refactored after changes in serialization code.