modified string reading/writing to use UTF-8