Left and right double quotes (not the regular double quote) incorrectly emitted in lprun
I dumped some data from SQL Server and some quoted text were not properly delimited. Upon closer inspection it turns out it turns out that the object contained left and right double quotes coming from cut/paste from Word. Then when emitted in a JSON object in lprun, they were converted to undelimited regular quotes by linqpad. Below is an sample of what I'm talking about (be aware that the left right double quotes are subtle).
This code:
var leftRightQuotedTextObject = new { quotedText = "“This is enclosed in left and right double quotes”"};
leftRightQuotedTextObject.Dump();
Shows up in lprun (linqpad 5 and 6 on Windows 10) as:
{
"quotedText": ""This is enclosed in left and right double quotes""
}
Here is the shared code:
http://share.linqpad.net/4hf3of.linq
Am I doing something wrong or is this a bug?
Comments
It looks like I need to add this code to LPRun:
This was a surprise: I assumed UTF-8 would have been the default, at least in .NET Core. I hope this change doesn't break anything!
https://stackoverflow.com/questions/5750203/how-to-write-unicode-characters-to-the-console