Opened 7 years ago
Closed 7 years ago
#12021 closed Bugs (invalid)
WaitForDebugEventEx should be called to enable unicode in OutputDebugStringW
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
From the MSDN documentation for OutputDebugString and WaitForDebugEventEx:
Important In the past, the operating system did not output Unicode strings via OutputDebugStringW and instead only output ASCII strings. To force OutputDebugStringW to correctly output Unicode strings, debuggers are required to call WaitForDebugEventEx to opt into the new behavior. On calling WaitForDebugEventEx, the operating system will know that the debugger supports Unicode and is specifically opting into receiving Unicode strings.
This is a Windows 10 api, it can be detected with code similar to:
typedef BOOL(WINAPI *MYWAITFORDEBUGEVENT)( _Out_ LPDEBUG_EVENT lpDebugEvent, _In_ DWORD dwMilliseconds ); static auto WFDEX = MYWAITFORDEBUGEVENT(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "WaitForDebugEventEx"));
(Note I had added several external links but trace rejected my bug as spam when I tried to submit this issue).
Change History (5)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Component: | None → log |
---|---|
Owner: | set to |
comment:3 by , 7 years ago
Sorry guess the component got lost when it got rejected for external links. Thanks for catching that.
comment:4 by , 7 years ago
I'm not sure what is there to do in Boost.Log. WaitForDebugEventEx is supposed to be called by the debugger, not the debuggee.
You need to say which boost library this pertains to.