Conversation
|
@CyrusNajmabadi @davidwengier I had to add another workaround (extra commit). PTAL. |
davidwengier
left a comment
There was a problem hiding this comment.
It's surprising to me that you have to write all of this code yourself. Is that just to avoid allocations that would happen if you just passed everything through System.Encoding like you do in EncodeMarker?
I'm approving though, as I trust that you're right with this stuff, more than I understand it :D
src/Interactive/Host/Interactive/Core/InteractiveHost.RemoteService.cs
Outdated
Show resolved
Hide resolved
I was wondering the same thing. There are 2 operations:
|
…rvice.cs Co-authored-by: David Wengier <david.wengier@microsoft.com>
* upstream/master: (143 commits) Use Unicode for OutputEncoding (dotnet#49721) Fix tests Remove unnecessary parens when converting switch statement ot expression. Fix flaky test Simplify implementation of IsOrInGenericType helper and reduce code duplication. (dotnet#49763) Increase CoreCLR dump information NRT Be resilient to a null-document in the code-folding service. Change cache implementation from dictionary to list Fix APIs for retrieving solution snapshot from Razor, UT (dotnet#49591) Handles optional parameters Feature/disambiguate using keyword (dotnet#48898) Check all overloads when inferring first argument in an invocation with nothing typed Remove optional parameter lint Clean up option handling Remove double blank line Add + update tests Ensure completion and completion resolve handler always pass the same options Change name of telemetry ...
Fixes #47571, #48874 and https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1231577.
It's not clear why using UTF8 does not work (issue https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1253106 is tracking further investigation) but it seems using
Unicodedoes work.Except when the CLR reports stack overflow error message - it does not encode it properly (see dotnet/runtime#45503).
To avoid printing garbled text we detect known CLR messages and transcode the output back to ASCII.