Convert String (UTF-16) to UTF-8 in C#

后端 未结 6 1970
囚心锁ツ
囚心锁ツ 2020-12-05 11:16

I need to convert a string to UTF-8 in C#. I\'ve already try many ways but none works as I wanted. I converted my string into a byte array and then to try to write it to an

6条回答
  •  天涯浪人
    2020-12-05 11:39

    Check the Jon Skeet answer to this other question: UTF-16 to UTF-8 conversion (for scripting in Windows)

    It contains the source code that you need.

    Hope it helps.

提交回复
热议问题