C# How to replace Microsoft's Smart Quotes with straight quotation marks?

后端 未结 12 1444
花落未央
花落未央 2020-12-08 00:50

My post below asked what the curly quotation marks were and why my app wouldn\'t work with them, my question now is how can I replace them when my program comes across them,

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 01:40

    it worked for me, you can try below code

    string replacedstring = ("your string with smart quotes").Replace('\u201d', '\'');
    

    Thanks!

提交回复
热议问题