-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode symbols not displayed #16
Comments
I suppose you're speaking about OutputDebugString ("ODS") traces as it should work fine for ETW traces. Indeed, it didn't work as Unicode support for OutputDebugString is very limited as explained in official documentation: https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-outputdebugstringw
However, I've added a feature where you can choose the encoding used for ODS traces, and this can ultimately allow you to use Unicode strings, but only with some limitations:
See full details here |
I don't know what app you're talking about exactly but this https://learn.microsoft.com/en-us/sysinternals/downloads/debugview doesn't work with Unicode. If you don't control the app and it's using OutputDebugStringW then there's nothing to do, it won't work in the general case. You should put exact input as texts, not bitmaps, they are useless when talking about characters. |
Yes, Debugview you linked to is the app I meant, and it does work with unicode, that's where the screenshot is from (the text coming from the app is h⃣k⃣⌂) The other app I've tried is https://github.com/CobaltFusion/DebugViewPP, which also displays the chars like DebugView |
AFAIK none of these work correctly with Unicode in general (and UTF-16 encoding in particular), they don't work for me. Give me a text and I'll show you how they render on my machine. Maybe you mean UTF-8, that's not strictly the same thing as Unicode and not the same thing as UTF-16, maybe what happens is you're using a code page on your machine which make it work, like I said in the doc here https://github.com/smourier/TraceSpy?tab=readme-ov-file#unicode-support-for-outputdebugstring-ods-traces that is possible |
I've given you the text in the previous comment: h⃣k⃣⌂ I don't know the exact encoding paths, the file with this text is UTF-8, but AutoHotkey is a UTF-16 app, the code page on my machine is indeed UTF-8, and that's the setting in TraceSpy (guess it picked up the system version, I didn't change anything) |
So the text here h⃣k⃣⌂ is composed of 5 unicode codepoints 0x0068 h Indeed when we see question mark glyphs (in a box or w/o a box), it means the font (or the graphics layer) used doesn't handle the caracter so this rendered text:
If I use, say, unifont https://www.unifoundry.com/unifont/index.html I can have glyph displayed when I do as instructed, ie: UTF8 + OutputDebugStringA So, with this C# program:
This is what I see: I can't manage to have this displayed using DbgView or DebugView++, if you see the proper glyphs w/o using a specific font, then it's something installed or configured in your machine lilke regional settings etc. that make it work. Actually this discussion in DebugView++ issues is more or less the same CobaltFusion/DebugViewPP#389 As for authotkey I don't know how to do the strict technical equivalent of what's done in C# (or in C/C++), ie OutputDebugStringA+UTF8. So, I will leave the code as is. |
I don't know, but actually it's the reverse for me, I can't get DebugView++ to display the proper glyph whatever I try. |
Have you tried setting those utf-8 system settings? Just checked, and indeed, without this enabled I get So I guess that explains it - TraceSpy is using a different path from this utf-8 system setting and thus doesn't have access to the system font fallback mechanism that is used automatically in that system setting path? |
With UTF-8 as default in Windows, WpfTraceSpy will choose UTF-8 as default encoding instead of ANSI encoding (this one depends on the code page) so with the same C# program, we see the glyph displayed but the 0x20E3 are not combined (this is more a limitation of WPF I think). So Unicode support works (rendering is another thing). For example if I send these chinese characters "我们一起去玩吧。" (with same C# code and Lucida Console) I see this, which is correct |
Is fixed for me. |
have you tried the combining keycap char? |
Here's how it looks with Tahoma font (I assume this is the appearance you want).[1] FWIW, I'm pretty convinced this is not an encoding but a font issue. If I copy and paste your |
It doesn't work in Microsoft Word (or Chrome, or Firefox) on my machine without using Tahoma font. If you run |
What do you mean "it doesn't work" when in the "Verdana"-labeled text you have the same working thing - a combining keycap correctly displayed as a combining keycap (though not perfectly overlapping the (by the way, you can actually click after
yes
No, you linked to a different issue. In that case the font sub was working, just using the wrong font, but still a font with a valid glyph for this symbol. In this case the font with a valid glyph exists, but is NOT used, instead displaying a generic "not found" box |
Instead I get garbage like this even though I've changed the font the fonts support the symbols
The text was updated successfully, but these errors were encountered: