Questions tagged [codecvt]

48 questions
0
votes
1 answer

C++ iostream UTF-16 file I/O with CR LF translation

I want to read and write utf-16 files which use CR LF line separators (L"\r\n"). Using C++ (Microsoft Visual Studio 2010) iostreams. I want every L"\n" written to the stream to be translated to L"\r\n" transparently. Using the codecvt_utf16 locale…
j66st
  • 11
  • 3
0
votes
0 answers

What the biggest size of output that std::codecvt::unshift() can need?

I am working on a custom file streambuf. Now, I want to flush on seek like fstream does. At this point I want to know how big the array for output of std::codecvt::unshift() should be? It seems to me that the size returned by…
wilx
  • 17,697
  • 6
  • 59
  • 114
0
votes
2 answers

fstream file size in codepoints

There are many questions on getting the file size of an std::fstream's file, but they all return the file size in bytes and are error prone if the file is open in another stream. I want to know the file size in codepoints, not bytes. Now…
Twifty
  • 3,267
  • 1
  • 29
  • 54
1 2 3
4