Steps to reproduce:
Debug Assertion Failed!
Program: T:\Programmcode\blupan\x64\Debug\blutest.exe
File: f:\dd\vctools\crt_bld\self_64_amd64\crt\src\fprintf.c
Line: 65
Expression: ( (_Stream->_flag & _IOSTRG) || ( fn = _fileno(_Stream), ( (_textmode_safe(fn) == __IOINFO_TM_ANSI) && !_tm_unicode_safe(fn))))
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
It seems like when a file is opened with a unicode encoding (like reported) then the ANSI versions of, e.g.,
printfwill fail. Only the unicode versions, i.e.fwprintf, will work and will perform the required conversions.As the log internally already stores all text strings in UTF-8 I am not too sure how to fix it without introducing additional, unsually unneccessary conversions.
Fixed: Stream-Sinks will now use unicode implementations on windows and ansi implementations on Linux. Changed implementation using a template-utility-class, which might even be an improvement over the old implementation in terms of performance (using only one printf-type-function instead of previously three).