Project

General

Profile

Actions

Bug #1130

open

Print wchar_t character instead of character code in debug message

Added by Michael Onken about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Library
Target version:
-
Start date:
2024-07-11
Due date:
% Done:

0%

Estimated time:
Module:
ofstd
Operating System:
Windows
Compiler:

Description

In

OFCommandLine::parseCommandFile(const wchar_t *argValue, OFString & /* strValue */, OFString> &argList)

i.e. the wchar_t version of this method, a debug message (#ifdef DEBUG) is about to print the 'block' (expected quotation mark) character that is missing in the provided command file. Hohwever, right now the debug message only prints the character code of the expected block character instead of the character itself.

The reason is that without a proper conversion from wchar_t to char*, the wchar_t cannot be dumped into the ofConsole error stream (ostream) since a build error is produced when using a C++20-enabled compiler on Windows in a Debug build.

In the future, the wchar_t should be converted so the character and not the code is printed to ofConsole. This would make the behaviour consistent with the non-wchar_t method of this method and is also considered more helpful for the reader of the output message..

No data to display

Actions

Also available in: Atom PDF