0

I have a file encoded in UTF16LE(UTF-16 little endian), I want to read this file and store its contents in a string encoded in UTF-8.

int main() {
  vector<char> utf16le_chars = read_file("/tmp/utf16.txt");
  string utf8_string = to_utf8(utf16le_chars);
}

How to implement the to_utf8 function?

2
  • 1
    If you're programming in C++ then please don't add any irrelevant language tags. Commented Aug 31, 2018 at 11:09
  • 1
    @Someprogrammerdude Sorry I thought that some C functions might also be helpful. Commented Sep 3, 2018 at 1:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.