change reading and writing methods, UTF-8 problem