Fix a bug that '\0' is ignored while copying utf8 lines.