|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Makes a Windows console display UTF-8 output for the lifetime of this object. More...
#include <bond/tools/commandline.h>
Public Member Functions | |
| Utf8ConsoleOutput () | |
| Switches the console's output code page to UTF-8. | |
| ~Utf8ConsoleOutput () | |
| Flushes stdout and stderr and restores the console's original output code page. | |
| Utf8ConsoleOutput (const Utf8ConsoleOutput &other)=delete | |
| Utf8ConsoleOutput & | operator= (const Utf8ConsoleOutput &other)=delete |
Makes a Windows console display UTF-8 output for the lifetime of this object.
The constructor switches the console's output code page to UTF-8. The destructor flushes stdout and stderr, then restores the original code page, since the code page belongs to the console and would otherwise persist after the program exits. Console input is not affected. On other platforms, this class does nothing.
This is intended for applications that own their console, such as the Bond tools. A library embedding Bond should leave the console configuration to its host application.
| Bond::Utf8ConsoleOutput::Utf8ConsoleOutput | ( | ) |
Switches the console's output code page to UTF-8.
| Bond::Utf8ConsoleOutput::~Utf8ConsoleOutput | ( | ) |
Flushes stdout and stderr and restores the console's original output code page.
|
delete |
|
delete |