0
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

shift-jis文字列をUTF-8コードに変換

Posted at

変換したUTF-8のバイト配列を16進数文字列で表現する。

    public static string ConvertSJIStoUTF8(string text)
    {
        byte[] bytesData = System.Text.Encoding.UTF8.GetBytes(text);
        string ret = '%'+ BitConverter.ToString(bytesData).Replace('-','%');
        return ret;
    }
0
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?