Converting problem ANSI to UTF8 C#

前端 未结 7 1667
借酒劲吻你
借酒劲吻你 2021-01-17 20:08

I have a problem with converting a text file from ANSI to UTF8 in c#. I try to display the results in a browser.

So I have a this text file with many accent characte

7条回答
  •  旧巷少年郎
    2021-01-17 20:35

    Do you have any idea why is this happening?

    Yes, you're too late. You need to specify ANSI when you read the string from file. In memory it's always Unicode (UTF16).

提交回复
热议问题