With a debugger, I see that, on WM_PASTE, GetClipboardData is called with CF_TEXT, and returns bytes 5A 6F 6C 74 E1 6E 00 = Zoltán. Then further down the line some mfc140u functions are called (#310, #301, #12765 and #1046), but I haven't identified their purpose yet. I'm guessing that text conversion could be done there. Could it be that the 'wrong' MFC libraries are used from my Visual Studio 2017 installation?
I think you might be using CF_TEXT instead of CF_UNICODETEXT with GetClipboardData?
Frustrating problem ;) I'm using Windows 10 Pro build 16299 (64-bit). Microsoft implemented some changes to font handling in Windows 10 (see this article), but unless the paste action changes the font used for the character, I tend to think this is more of a unicode issue where the actual bytes change when they are pasted from the clipboard. Setting the compatibility mode for Msc-generator to Windows 8 does not change the behaviour. Also, copying a text with diacritics from Msc-generator to Notepad...
Hi Zoltan, I've tried this with both Lucida fonts, Courier New and Consolas. With Consolas, the box with a question mark appears, with the other two fonts an empty box appears. What I noticed is that if I copy the following two letters"éé" and paste them, this results in the box with the question mark or the empty box depending on the font. If I copy "aé" this results in "a", if I copy just "é" the cursor disappears and the editor starts to wait for another keystroke before it's released again. Note...
Obscure "You have more than one..." error with templates
Hi Zoltan, These are good outside-the-box suggestions, thanks! Unfortunately, I'm running into the error 'Cannot define designs inside a procedure' with the following code. defproc themecore($name) { defdesign $name { defstyle accent1fill [fill.color=accent1]; }; } defcolor accent1="#00ff00"; replay themecore("theme1"); defcolor accent1="#0000ff"; replay themecore("theme2"); use col; usedesign theme1; # Was expecting that both boxes are green box: Theme1 Accent1 Fill Style [accent1fill]; box: Theme1...
Hi Zoltan, congratulations with your newborn to you and your family! I know from experience that these are life-altering events :)
Hi Zoltan, The letters display fine when I type them, the mangling only occurs when text like this is copied and pasted in the builtin editor. The workflow is something like this: Start a new Msc-generator instance (select "Block Diagram" when asked for a chart type) Replace any existing text with the word "Zoltán" Select all text ([Ctrl]+[A]) Copy text ([Ctrl]+[C]) Paste text ([Ctrl]+[V]) Kind regards, Martijn Schiedon