I need to read a text file that is UTF-8 encoded Unicode, and must write this data to another text file. The file has section delimited data in lines.
My read code is C ++ code without unicode support. What I am doing is reading the file line by line in string/char* and putting that line in the destination file. I cannot change the code, so suggestions for changing the code are not welcome.
What I want to know is that when reading line by line, I can meet the NULL terminating character ('\ 0') in the line, since it is unicode and one character can span several bytes.
My opinion was that it is possible that a trailing NULL character may occur in a string. Your thoughts?
source share