I need a file io library that can give my program a utf-16 (little endian) interface, but can handle files in other encodings, mainly ascii(input only), utf-8, utf-16, utf-32/uc
I think the problems come from the 0D 0A 00
linebreaks. You could try if other linebreaks like \r\n
or using LF or CR alone do work (best bet would be using \r
, I suppose)
EDIT: It seems 0D 00 0A 00
is what you want, so you can try
std::wstring str = L"Hello World in UTF-16!\15\12Another line.\15\12";