Steps to reproduce
Brief: Source code examples and code references cannot be copied. They will cause errors because contiguos space characters (0x20) are converted to non-breaking spaces (0xA0).
Example: The “Syntax” code box with the declaration of the MultiByteToWideChar function inside.
Although the failure is not limited to the MSDN. It happens on any other web site (like internet forums).
How to reproduce:
Open the linked example using Edge. Copy the function declaration out of the linked reference. Paste it in an empty text document using Notepad. Save it ANSI encoded. Use any HEX editor to observe the bytes of indentations.
Use Internet Explorer or any browser other than Edge for comparisons.
Microsoft Edge 38.14393.0.0
Microsoft EdgeHTML 14.14393
Microsoft Windows 10 Home [Version 10.0.14393] 32 bit, de-DE
Comments and activity
This has to be by far the most annoying thing ever. Maybe perhaps because I’ve been having issues since started using Microsoft Edge as my primary browser back when Windows AU was officially released.
This programming language I’m using, keeps complaining with 'Syntax error’. It is annoying to have to keep launching Internet Explorer to page and scrolling around.
- Microsoft Edge Team
Changed Assigned To to “Brad E.”
Thank you for confirming this issue. I’m afraid it will force me to rescind my decision to use Edge as default browser. I’m quite active in several programming forums and thus, I’m dependent on copying code snippets of questioners in order to debug them …
Thanks for stopping by!
I just noticed that my wording wasn’t quite clear. The first sentence should rather read:
“Copied source code examples and code references cannot be used.”
If you need some further information or if there is anything you want me to try out don’t hesitate to get in contact. Thank you!
- Microsoft Edge Team
Changed Assigned To from “Brad E.” to “Steven K.”
I keep on waiting. My offer to help in any kind still stands. If I wasn’t clear enough or if you have problems to reproduce this issue just tell me.
At least I gave Edge a chance. But five weeks without any official response, not even the confirmation of this issue - why did you develop a new browser if you’re not interested in? Bye Edge, hello Chrome. (Don’t forget to provide any good reason why I should make any efforts to return to Edge if you ever fixed this issue.)
w/Microsoft Edge 38.14393.0.0 and is still very much an issue.
Furthermore, there’s another side-effect to copying source codes. Not always however it causes the Edge page I’m copying from to freeze. I do have two Edge extensions installed, AdBlock Plus and ' Translator For Microsoft Edge '.
I have tried not only disabling these Edge extensions and restarting Edge browser, but I also uninstalled them and restarted Edge and tested. Experienced the same very issue copying from certain webpages.
This not a problem with Internet Explorer, just Microsoft Edge.
… I was in hopes this’ll be patched up in time for the official Windows 10 Creators Update that’ll be served shortly.
Regarding my previous post detailing another frequent copying issue w/Microsoft Edge. It probably should have been posted as a new topic. I’m uncertain if this could be related issue, so apologies to the OP. If the MODs deem worthy, they can split this off into a new topic, and I’ll also be okay with that.
Besides what I’ve said in the previous post. The frequent page freezes in Microsoft Edge is simply reproduced when just right-clicking w/mouse on highlighted source code, and no further action required to experience the Microsoft Edge browser page freeze. It depends I guess on the source code I have highlighted to trigger every-time the Microsoft Edge page freeze. Not every source code I’m trying to copy causes page freeze.
I can successfully copy every-time from the problematic code sources using keyboard shortcut to copy highlighted contents (CTRL + C) without triggering a page freeze.
I’m virtually certain this is not related. For a proper tracking you should rather open a new issue (imho).
Code pages and character encoding is confusing. It appears the web page you referenced in this bug report is using UTF-8. If you copy a UTF-8 encoded page from Edge and paste it into an editor that supports UTF-8, you are fine. However, using an editor to force UTF-8 encoding to ANSI is going to cause a loss in information because UTF-8 can represent much more information than “ANSI” encoding.
See this site for a quick overview:
This site is great if you want to get into to the details:
Long story, shorter, I recommend using an IDE or text editor that supports UTF-8. Using old tools that do not will lead to quite understandably annoying surprises, e.g. copying and pasting from MS Word into a console that doesn’t support UTF-8. If the source data and the target both match, again no conversion issues.
If you are stuck with using and old editor or console just be careful with the common codes that don’t translate well. The characters with the green border are the common characters to get converted improperly. (Differences from ISO-8859-1)
Hope this helps and understand the frustration,
The MS Edge Team
According to the author of a popular programming language, Edge is at fault.
The programming language ( PureBasic ) by default uses UTF-8 file format. Copying codes from Internet Explorer isn’t an issue. Copying codes from Microsoft Edge is.
Why is copying the same codes from Internet Explorer okay? What makes copying codes in Microsoft Edge not okay if its UTF-8 encoded pages?
I’m reading that Edge is copying and manipulating the content that it stores in the clipboard, different than what is actually used on the page.
What should I say to the author of a popular programming language to make this person believe Edge isn’t the issue? Because I’m running out of ideas.
I need to apologize. I spoke too soon because I hear this question a lot and thought it was that same issue. Hope you accept my apology. :-/
I was also wrong in that I missed the white space conversion after the "In" in the code snippet. Before the snippet, the HTML has regular space, and I noticed only that and then responded. However, after the snippet, the HTML code has  ’s. I did not expect that.
I also did not expect that Chrome is converting those into 0x20’s and Edge is copying the characters without conversion. See my attached screenshots.
It appears what we are seeing, and the author, you, and I are saying is now making sense. Edge is not doing the converting while Chrome and IE are converting. Because PureBasic supports UTF-8, it will be able to display what is pasted.
And yes, I know you highlighted that exact part where the  ’s are in the HTML code. :/
Thank you for pushing this issue.
Your certainly welcome. :)
It’s good to see something happened over night (in Germany).
Don’t get me wrong - I accept your apologies not understanding the problem in the first place. Probably it was just my bad explanation since English isn’t my mother tongue. But funny enough the issue was now left unassigned and still without “confirmed” marking. That’s what I don’t understand (two months after reporting this issue).
“unassigned” in this case is actually a step forward. The process is that once the bug report has been repro’d with specific repro steps, we send the bug report to the team that will resolve the issue.
The delay was related to ramping up staffing to support these bug reports, and unfortunately, this one went into my queue. :-/
Anyway, I think we are on the right track now.
Cheers and really appreciate the support and this detailed bug submission,
The MS Edge Team
- Microsoft Edge Team
Changed Assigned To to “Balaji B.”
You’re welcome and thanks for the clarification. I’ll leave the topic alone for now unless you would need further support from my side.