Hi ,
I am facing issue reading a file which contains comma seperated ucs2 data in it. I need a program which reads the file contents and split(tokenize) each line in the file.
I used wifstream but could not read the contents of file properly. I have paste a test program below ... any help is appreciated.
I'm not a great expert in this and I don't know much about UCS-2 but it is a 2-byte character encoding. One problem with the C++ standard is that wchar_t is not always 2 bytes big. In fact on my system it is 4 bytes.
So on my system wchar_t is not appropriate for reading UCS-2 data.
You might consider reading in using the normal character streams and converting every two bytes to a single wchar_t afterwards.