#include <cxxtools/iconvstream.h>
Public Member Functions | |
| iconvstream (std::ostream &sink, const char *tocode, const char *fromcode) | |
| void | open (std::ostream &sink_, const char *tocode, const char *fromcode) |
| void | close () throw () |
To perform a character set conversion from one characterset to another, instantiate a iconvstream with a std::ostream as a sink. Write the data to the iconvstream and the converted stream is written to the sink.
example (unix2win-filter):
int main(int argc, char* argv[]) { cxxtools::iconvstream out(std::cout, "LATIN1", "WINDOWS-1251"); // copy input to output: out << std::cin.rdbuf(); }