mirror of https://github.com/AxioDL/logvisor.git
f23179e168
If wide char stdlib functions are used on a narrow char stream, they attempt to narrow the character or string. If this fails, nothing is written to the stream and an error is indicated. The {fmt} library, at its core, uses stdlib functions for printing to a stream. However, it takes it a step further and acts upon errors while printing by throwing an exception. If narrow char stdlib functions are used on a wide char stream, they throw an assertion. The {fmt} library somehow does not throw an assertion, but whatever it ends up printing is garbage anyhow. So from either end, it is generally a bad idea to mix narrow and wide character printing. While you can get away with using wide char functions on a narrow char stream, the moment you start using anything other than English characters, it all falls apart. Just as well, narrow chars on wide char streams do not work at all. Despite this, I found many situations where wide char printing and narrow char printing was being used at the same time. This PR makes character printing homogeneous to avoid the previously discussed issues. |
||
---|---|---|
.. | ||
logvisor.cpp |