UTF8Encoding クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Unicode 文字の UTF-8 エンコードを表します。
public ref class UTF8Encoding : System::Text::Encoding
public class UTF8Encoding : System.Text.Encoding
[System.Serializable]
public class UTF8Encoding : System.Text.Encoding
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class UTF8Encoding : System.Text.Encoding
type UTF8Encoding = class
inherit Encoding
[<System.Serializable>]
type UTF8Encoding = class
inherit Encoding
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type UTF8Encoding = class
inherit Encoding
Public Class UTF8Encoding
Inherits Encoding
- 継承
- 属性
例
次の例では、オブジェクトを UTF8Encoding 使用して Unicode 文字の文字列をエンコードし、バイト配列に格納します。 Unicode 文字列には、ASCII 文字範囲外の 2 つの文字 Pi (U+03A0) と Sigma (U+03A3) が含まれます。 エンコードされたバイト配列が文字列にデコードされると、Pi 文字と Sigma 文字が引き続き存在します。
using namespace System;
using namespace System::Text;
//using namespace System::Collections;
int main()
{
// Create a UTF-8 encoding.
UTF8Encoding^ utf8 = gcnew UTF8Encoding;
// A Unicode string with two characters outside an 8-bit code range.
String^ unicodeString = L"This Unicode string has 2 characters " +
L"outside the ASCII range:\n" +
L"Pi (\u03a0), and Sigma (\u03a3).";
Console::WriteLine("Original string:");
Console::WriteLine(unicodeString);
// Encode the string.
array<Byte>^ encodedBytes = utf8->GetBytes(unicodeString );
Console::WriteLine();
Console::WriteLine("Encoded bytes:");
for (int ctr = 0; ctr < encodedBytes->Length; ctr++) {
Console::Write( "{0:X2} ", encodedBytes[ctr]);
if ((ctr + 1) % 25 == 0)
Console::WriteLine();
}
Console::WriteLine();
// Decode bytes back to string.
String^ decodedString = utf8->GetString(encodedBytes);
Console::WriteLine();
Console::WriteLine("Decoded bytes:");
Console::WriteLine(decodedString);
}
// The example displays the following output:
// Original string:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
//
// Encoded bytes:
// 54 68 69 73 20 55 6E 69 63 6F 64 65 20 73 74 72 69 6E 67 20 68 61 73 20 32
// 20 63 68 61 72 61 63 74 65 72 73 20 6F 75 74 73 69 64 65 20 74 68 65 20 41
// 53 43 49 49 20 72 61 6E 67 65 3A 20 0D 0A 50 69 20 28 CE A0 29 2C 20 61 6E
// 64 20 53 69 67 6D 61 20 28 CE A3 29 2E
//
// Decoded bytes:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
using System;
using System.Text;
class Example
{
public static void Main()
{
// Create a UTF-8 encoding.
UTF8Encoding utf8 = new UTF8Encoding();
// A Unicode string with two characters outside an 8-bit code range.
String unicodeString =
"This Unicode string has 2 characters outside the " +
"ASCII range:\n" +
"Pi (\u03a0), and Sigma (\u03a3).";
Console.WriteLine("Original string:");
Console.WriteLine(unicodeString);
// Encode the string.
Byte[] encodedBytes = utf8.GetBytes(unicodeString);
Console.WriteLine();
Console.WriteLine("Encoded bytes:");
for (int ctr = 0; ctr < encodedBytes.Length; ctr++) {
Console.Write("{0:X2} ", encodedBytes[ctr]);
if ((ctr + 1) % 25 == 0)
Console.WriteLine();
}
Console.WriteLine();
// Decode bytes back to string.
String decodedString = utf8.GetString(encodedBytes);
Console.WriteLine();
Console.WriteLine("Decoded bytes:");
Console.WriteLine(decodedString);
}
}
// The example displays the following output:
// Original string:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
//
// Encoded bytes:
// 54 68 69 73 20 55 6E 69 63 6F 64 65 20 73 74 72 69 6E 67 20 68 61 73 20 32
// 20 63 68 61 72 61 63 74 65 72 73 20 6F 75 74 73 69 64 65 20 74 68 65 20 41
// 53 43 49 49 20 72 61 6E 67 65 3A 20 0D 0A 50 69 20 28 CE A0 29 2C 20 61 6E
// 64 20 53 69 67 6D 61 20 28 CE A3 29 2E
//
// Decoded bytes:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
Imports System.Text
Class Example
Public Shared Sub Main()
' Create a UTF-8 encoding.
Dim utf8 As New UTF8Encoding()
' A Unicode string with two characters outside an 8-bit code range.
Dim unicodeString As String = _
"This Unicode string has 2 characters outside the " &
"ASCII range: " & vbCrLf &
"Pi (" & ChrW(&h03A0) & "), and Sigma (" & ChrW(&h03A3) & ")."
Console.WriteLine("Original string:")
Console.WriteLine(unicodeString)
' Encode the string.
Dim encodedBytes As Byte() = utf8.GetBytes(unicodeString)
Console.WriteLine()
Console.WriteLine("Encoded bytes:")
For ctr As Integer = 0 To encodedBytes.Length - 1
Console.Write("{0:X2} ", encodedBytes(ctr))
If (ctr + 1) Mod 25 = 0 Then Console.WriteLine
Next
Console.WriteLine()
' Decode bytes back to string.
Dim decodedString As String = utf8.GetString(encodedBytes)
Console.WriteLine()
Console.WriteLine("Decoded bytes:")
Console.WriteLine(decodedString)
End Sub
End Class
' The example displays the following output:
' Original string:
' This Unicode string has 2 characters outside the ASCII range:
' Pi (π), and Sigma (Σ).
'
' Encoded bytes:
' 54 68 69 73 20 55 6E 69 63 6F 64 65 20 73 74 72 69 6E 67 20 68 61 73 20 32
' 20 63 68 61 72 61 63 74 65 72 73 20 6F 75 74 73 69 64 65 20 74 68 65 20 41
' 53 43 49 49 20 72 61 6E 67 65 3A 20 0D 0A 50 69 20 28 CE A0 29 2C 20 61 6E
' 64 20 53 69 67 6D 61 20 28 CE A3 29 2E
'
' Decoded bytes:
' This Unicode string has 2 characters outside the ASCII range:
' Pi (π), and Sigma (Σ).
次の例では、前の例と同じ文字列を使用します。ただし、エンコードされたバイトをファイルに書き込み、バイト ストリームの先頭にバイト オーダー マーク (BOM) を付ける点が異なります。 次に、オブジェクトを使用 StreamReader してテキスト ファイルとして、バイナリ ファイルとして、2 つの異なる方法でファイルを読み取ります。 ご期待のとおり、新しく読み取られた文字列には BOM は含まれます。
using System;
using System.IO;
using System.Text;
public class Example
{
public static void Main()
{
// Create a UTF-8 encoding that supports a BOM.
Encoding utf8 = new UTF8Encoding(true);
// A Unicode string with two characters outside an 8-bit code range.
String unicodeString =
"This Unicode string has 2 characters outside the " +
"ASCII range:\n" +
"Pi (\u03A0)), and Sigma (\u03A3).";
Console.WriteLine("Original string:");
Console.WriteLine(unicodeString);
Console.WriteLine();
// Encode the string.
Byte[] encodedBytes = utf8.GetBytes(unicodeString);
Console.WriteLine("The encoded string has {0} bytes.",
encodedBytes.Length);
Console.WriteLine();
// Write the bytes to a file with a BOM.
var fs = new FileStream(@".\UTF8Encoding.txt", FileMode.Create);
Byte[] bom = utf8.GetPreamble();
fs.Write(bom, 0, bom.Length);
fs.Write(encodedBytes, 0, encodedBytes.Length);
Console.WriteLine("Wrote {0} bytes to the file.", fs.Length);
fs.Close();
Console.WriteLine();
// Open the file using StreamReader.
var sr = new StreamReader(@".\UTF8Encoding.txt");
String newString = sr.ReadToEnd();
sr.Close();
Console.WriteLine("String read using StreamReader:");
Console.WriteLine(newString);
Console.WriteLine();
// Open the file as a binary file and decode the bytes back to a string.
fs = new FileStream(@".\UTF8Encoding.txt", FileMode.Open);
Byte[] bytes = new Byte[fs.Length];
fs.Read(bytes, 0, (int)fs.Length);
fs.Close();
String decodedString = utf8.GetString(bytes);
Console.WriteLine("Decoded bytes:");
Console.WriteLine(decodedString);
}
}
// The example displays the following output:
// Original string:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
//
// The encoded string has 88 bytes.
//
// Wrote 91 bytes to the file.
//
// String read using StreamReader:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
//
// Decoded bytes:
// This Unicode string has 2 characters outside the ASCII range:
// Pi (π), and Sigma (Σ).
Imports System.IO
Imports System.Text
Class Example
Public Shared Sub Main()
' Create a UTF-8 encoding that supports a BOM.
Dim utf8 As New UTF8Encoding(True)
' A Unicode string with two characters outside an 8-bit code range.
Dim unicodeString As String = _
"This Unicode string has 2 characters outside the " &
"ASCII range: " & vbCrLf &
"Pi (" & ChrW(&h03A0) & "), and Sigma (" & ChrW(&h03A3) & ")."
Console.WriteLine("Original string:")
Console.WriteLine(unicodeString)
Console.WriteLine()
' Encode the string.
Dim encodedBytes As Byte() = utf8.GetBytes(unicodeString)
Console.WriteLine("The encoded string has {0} bytes.",
encodedBytes.Length)
Console.WriteLine()
' Write the bytes to a file with a BOM.
Dim fs As New FileStream(".\UTF8Encoding.txt", FileMode.Create)
Dim bom() As Byte = utf8.GetPreamble()
fs.Write(bom, 0, bom.Length)
fs.Write(encodedBytes, 0, encodedBytes.Length)
Console.WriteLine("Wrote {0} bytes to the file.", fs.Length)
fs.Close()
Console.WriteLine()
' Open the file using StreamReader.
Dim sr As New StreamReader(".\UTF8Encoding.txt")
Dim newString As String = sr.ReadToEnd()
sr.Close()
Console.WriteLine("String read using StreamReader:")
Console.WriteLine(newString)
Console.WriteLine()
' Open the file as a binary file and decode the bytes back to a string.
fs = new FileStream(".\UTF8Encoding.txt", FileMode.Open)
Dim bytes(fs.Length - 1) As Byte
fs.Read(bytes, 0, fs.Length)
fs.Close()
Dim decodedString As String = utf8.GetString(bytes)
Console.WriteLine("Decoded bytes:")
Console.WriteLine(decodedString)
End Sub
End Class
' The example displays the following output:
' Original string:
' This Unicode string has 2 characters outside the ASCII range:
' Pi (π), and Sigma (Σ).
'
' The encoded string has 88 bytes.
'
' Wrote 91 bytes to the file.
'
' String read using StreamReader:
' This Unicode string has 2 characters outside the ASCII range:
' Pi (π), and Sigma (Σ).
'
' Decoded bytes:
' This Unicode string has 2 characters outside the ASCII range:
' Pi (π), and Sigma (Σ).
注釈
エンコーディングは、Unicode 文字のセットをバイト シーケンスに変換するプロセスです。 デコードは、エンコードされたバイトのシーケンスを Unicode 文字のセットに変換するプロセスです。
UTF-8 は、各コード ポイントを 1 ~ 4 バイトのシーケンスとして表す Unicode エンコードです。 UTF-16 および UTF-32 エンコードとは異なり、UTF-8 エンコードでは "エンディアン" は必要ありません。エンコード スキームは、プロセッサがビッグ エンディアンかリトル エンディアンかに関係なく同じです。 UTF8Encodingは、Windows コード ページ 65001 に対応します。 UDF およびサポートされるSystem.Textその他のエンコードの詳細については、.NET Frameworkの文字エンコードを参照してください。
バイト オーダー マーク (BOM) を提供するかどうか、およびエラー検出を有効にするかどうかに応じて、さまざまな方法でオブジェクトをインスタンス化 UTF8Encoding できます。 次の表に、オブジェクトを返すコンストラクターとプロパティをEncodingUTF8Encoding示します。
| メンバー | BOM | エラー検出 |
|---|---|---|
| Encoding.UTF8 | はい | いいえ (代替フォールバック) |
| UTF8Encoding.UTF8Encoding() | いいえ | いいえ (代替フォールバック) |
| UTF8Encoding.UTF8Encoding(Boolean) | 構成可能 | いいえ (代替フォールバック) |
| UTF8Encoding.UTF8Encoding(Boolean, Boolean) | 構成可能 | 構成可能 |
メソッドによって、 GetByteCount Unicode 文字のセットをエンコードするバイト数が決定され、 GetBytes メソッドは実際のエンコーディングを実行します。
同様に、メソッドは GetCharCount バイトシーケンスをデコードする結果の文字数を決定し GetChars 、メソッドは GetString 実際のデコードを実行します。
複数のブロックにまたがるデータ (100,000 文字のセグメントでエンコードされた 100 万文字の文字列など) をエンコードまたはデコードするときに状態情報を保存できるエンコーダーまたはデコーダーの場合は、それぞれプロパティをGetDecoder使用GetEncoderします。
必要に応じて、 UTF8Encoding オブジェクトはバイト順マーク (BOM) を提供します。これはバイトの配列であり、エンコード 処理の結果としてバイト ストリームの先頭にプレフィックスを付けることができます。 UTF-8 でエンコードされたバイト ストリームの先頭にバイト順マーク (BOM) が付いている場合は、デコーダーがバイトオーダーと変換形式または UTF を決定するのに役立ちます。 ただし、Unicode 標準では UTF-8 でエンコードされたストリームで BOM を必要とせず、推奨もしません。 バイト順とバイト順マークの詳細については、unicodeホームページの unicode 標準を参照してください。
BOM を提供するようにエンコーダーが構成されている場合は、メソッドを呼び出 GetPreamble して取得できます。それ以外の場合、メソッドは空の配列を返します。 オブジェクトが BOM サポート用に構成されている場合 UTF8Encoding でも、必要に応じてエンコードされたバイト ストリームの先頭に BOM を含める必要があることに注意してください。クラスの UTF8Encoding エンコード メソッドでは、この処理は自動的には行われません。
注意事項
エラー検出を有効にし、クラス インスタンスのセキュリティを強化するには、コンストラクターをUTF8Encoding(Boolean, Boolean)呼び出し、パラメーターtrueを throwOnInvalidBytes . エラー検出を有効にすると、無効な一連の文字またはバイトを検出するメソッドは例外を ArgumentException スローします。 エラー検出がない場合、例外はスローされず、一般に無効なシーケンスは無視されます。
注意
UTF-8 でエンコードされたオブジェクトの状態は、異なる.NET Framework バージョンを使用してオブジェクトをシリアル化および逆シリアル化する場合は保持されません。
コンストラクター
| UTF8Encoding() |
UTF8Encoding クラスの新しいインスタンスを初期化します。 |
| UTF8Encoding(Boolean) |
UTF8Encoding クラスの新しいインスタンスを初期化します。 Unicode バイト順マークを付加するかどうかを指定するパラメーター。 |
| UTF8Encoding(Boolean, Boolean) |
UTF8Encoding クラスの新しいインスタンスを初期化します。 パラメーターでは、Unicode バイト順マークを付加するかどうか、および無効なエンコードが検出されたときに例外をスローするかどうかを指定します。 |
プロパティ
| BodyName |
派生クラスでオーバーライドされた場合、メール エージェントの Body タグと共に使用できる現在のエンコーディングの名前を取得します。 (継承元 Encoding) |
| CodePage |
派生クラスでオーバーライドされた場合、現在の Encoding のコード ページ ID を取得します。 (継承元 Encoding) |
| DecoderFallback |
現在の DecoderFallback オブジェクトの Encoding オブジェクトを取得または設定します。 (継承元 Encoding) |
| EncoderFallback |
現在の EncoderFallback オブジェクトの Encoding オブジェクトを取得または設定します。 (継承元 Encoding) |
| EncodingName |
派生クラスでオーバーライドされた場合、現在のエンコーディングについての記述を、ユーザーが判読できる形式で取得します。 (継承元 Encoding) |
| HeaderName |
派生クラスでオーバーライドされた場合、メール エージェント ヘッダー タグと共に使用できる現在のエンコーディングの名前を取得します。 (継承元 Encoding) |
| IsBrowserDisplay |
派生クラスでオーバーライドされた場合、ブラウザー クライアントが現在のエンコーディングを使用してコンテンツを表示できるかどうかを示す値を取得します。 (継承元 Encoding) |
| IsBrowserSave |
派生クラスでオーバーライドされた場合、ブラウザー クライアントが現在のエンコーディングを使用してコンテンツを保存できるかどうかを示す値を取得します。 (継承元 Encoding) |
| IsMailNewsDisplay |
派生クラスでオーバーライドされた場合、メール クライアントおよびニュース クライアントが現在のエンコーディングを使用してコンテンツを表示できるかどうかを示す値を取得します。 (継承元 Encoding) |
| IsMailNewsSave |
派生クラスでオーバーライドされた場合、メール クライアントおよびニュース クライアントが現在のエンコーディングを使用してコンテンツを保存できるかどうかを示す値を取得します。 (継承元 Encoding) |
| IsReadOnly |
派生クラスでオーバーライドされた場合、現在のエンコーディングが読み取り専用かどうかを示す値を取得します。 (継承元 Encoding) |
| IsSingleByte |
派生クラスでオーバーライドされた場合、現在のエンコーディングが 1 バイトのコード ポイントを使用するかどうかを示す値を取得します。 (継承元 Encoding) |
| Preamble |
このオブジェクトが UTF-8 形式でエンコードされた Unicode バイト順マークを提供するように構成されている場合は、そのようなマークを取得します。 |
| Preamble |
派生クラスでオーバーライドされた場合、使用するエンコードを指定するバイト シーケンスを含むスパンが返されます。 (継承元 Encoding) |
| WebName |
派生クラスでオーバーライドされた場合、現在のエンコーディングの IANA (Internet Assigned Numbers Authority) に登録されている名前を取得します。 (継承元 Encoding) |
| WindowsCodePage |
派生クラスでオーバーライドされた場合、現在のエンコーディングに最も厳密に対応する Windows オペレーティング システムのコード ページを取得します。 (継承元 Encoding) |
メソッド
| Clone() |
派生クラスでオーバーライドされた場合、現在の Encoding オブジェクトの簡易コピーを作成します。 (継承元 Encoding) |
| Equals(Object) |
指定したオブジェクトが、現在の UTF8Encoding オブジェクトと等しいかどうかを判断します。 |
| GetByteCount(Char*, Int32) |
指定した文字ポインターで始まる文字のセットをエンコードすることによって生成されるバイト数を計算します。 |
| GetByteCount(Char*, Int32) |
派生クラスでオーバーライドされた場合、指定した文字ポインターから始まる文字のセットをエンコードすることによって生成されるバイト数を計算します。 (継承元 Encoding) |
| GetByteCount(Char[]) |
派生クラスでオーバーライドされた場合、指定した文字配列に格納されているすべての文字をエンコードすることによって生成されるバイト数を計算します。 (継承元 Encoding) |
| GetByteCount(Char[], Int32, Int32) |
指定した文字配列から文字のセットをエンコードすることによって生成されるバイト数を計算します。 |
| GetByteCount(ReadOnlySpan<Char>) |
指定された文字スパンをエンコードすることによって生成されるバイト数を計算します。 |
| GetByteCount(ReadOnlySpan<Char>) |
派生クラスでオーバーライドされた場合、指定した文字スパンに格納されている文字をエンコードすることによって生成されるバイト数を計算します。 (継承元 Encoding) |
| GetByteCount(String) |
指定した String 内の文字をエンコードすることによって生成されるバイト数を計算します。 |
| GetByteCount(String, Int32, Int32) |
派生クラスでオーバーライドされた場合、指定した文字列の文字のセットをエンコードすることによって生成されるバイト数を計算します。 (継承元 Encoding) |
| GetBytes(Char*, Int32, Byte*, Int32) |
指定した文字ポインターで始まる文字のセットを、指定したバイト ポインターを開始位置として格納されるバイト シーケンスにエンコードします。 |
| GetBytes(Char*, Int32, Byte*, Int32) |
派生クラスでオーバーライドされた場合、指定した文字ポインターで始まる文字のセットを、指定したバイト ポインターを開始位置として格納されるバイト シーケンスにエンコードします。 (継承元 Encoding) |
| GetBytes(Char[]) |
派生クラスでオーバーライドされた場合、指定した文字配列に格納されているすべての文字をバイト シーケンスにエンコードします。 (継承元 Encoding) |
| GetBytes(Char[], Int32, Int32) |
派生クラスでオーバーライドされた場合、指定した文字配列に格納されている文字のセットをバイト シーケンスにエンコードします。 (継承元 Encoding) |
| GetBytes(Char[], Int32, Int32, Byte[], Int32) |
指定した文字配列に格納されている文字のセットを指定したバイト配列にエンコードします。 |
| GetBytes(ReadOnlySpan<Char>, Span<Byte>) |
指定された文字スパンを指定されたバイト スパンにエンコードします。 |
| GetBytes(ReadOnlySpan<Char>, Span<Byte>) |
派生クラスでオーバーライドされた場合、指定した読み取り専用スパンに格納されている文字のセットをバイトのスパンにエンコードします。 (継承元 Encoding) |
| GetBytes(String) |
指定した String オブジェクトに含まれる文字をバイト シーケンスにエンコードします。 |
| GetBytes(String) |
派生クラスでオーバーライドされた場合、指定した文字列に含まれるすべての文字をバイト シーケンスにエンコードします。 (継承元 Encoding) |
| GetBytes(String, Int32, Int32) |
派生クラスでオーバーライドされた場合、指定した文字列内の |
| GetBytes(String, Int32, Int32, Byte[], Int32) |
指定した String の文字セットを、指定したバイト配列にエンコードします。 |
| GetCharCount(Byte*, Int32) |
指定したバイト ポインターで始まるバイト シーケンスをデコードすることによって生成される文字数を計算します。 |
| GetCharCount(Byte*, Int32) |
派生クラスでオーバーライドされた場合、指定したバイト ポインターから始まるバイト シーケンスをデコードすることによって生成される文字数を計算します。 (継承元 Encoding) |
| GetCharCount(Byte[]) |
派生クラスでオーバーライドされた場合、指定したバイト配列に格納されているすべてのバイトをデコードすることによって生成される文字数を計算します。 (継承元 Encoding) |
| GetCharCount(Byte[], Int32, Int32) |
指定したバイト配列からバイト シーケンスをデコードすることによって生成される文字数を計算します。 |
| GetCharCount(ReadOnlySpan<Byte>) |
指定されたバイト スパンをデコードすることによって生成される文字数を計算します。 |
| GetCharCount(ReadOnlySpan<Byte>) |
派生クラスでオーバーライドされた場合、指定した読み取り専用バイト スパンをデコードすることによって生成される文字数を計算します。 (継承元 Encoding) |
| GetChars(Byte*, Int32, Char*, Int32) |
指定したバイト ポインターで始まるバイト シーケンスを、指定した文字ポインターを開始位置として格納される文字のセットにデコードします。 |
| GetChars(Byte*, Int32, Char*, Int32) |
派生クラスでオーバーライドされた場合、指定したバイト ポインターで始まるバイト シーケンスを、指定した文字ポインターを開始位置として格納される文字のセットにデコードします。 (継承元 Encoding) |
| GetChars(Byte[]) |
派生クラスでオーバーライドされた場合、指定したバイト配列に格納されているすべてのバイトを文字のセットにデコードします。 (継承元 Encoding) |
| GetChars(Byte[], Int32, Int32) |
派生クラスでオーバーライドされた場合、指定したバイト配列に格納されているバイト シーケンスを文字のセットにデコードします。 (継承元 Encoding) |
| GetChars(Byte[], Int32, Int32, Char[], Int32) |
指定したバイト配列に格納されているバイト シーケンスを指定した文字配列にデコードします。 |
| GetChars(ReadOnlySpan<Byte>, Span<Char>) |
指定されたバイト スパンを指定された文字スパンにデコードします。 |
| GetChars(ReadOnlySpan<Byte>, Span<Char>) |
派生クラスでオーバーライドされた場合、指定した読み取り専用バイト スパンに格納されているすべてのバイトを、文字スパンにデコードします。 (継承元 Encoding) |
| GetDecoder() |
UTF-8 でエンコードされたバイト シーケンスを Unicode 文字のシーケンスに変換するデコーダーを取得します。 |
| GetEncoder() |
Unicode 文字のシーケンスを UTF-8 でエンコードされたバイト シーケンスに変換するエンコーダーを取得します。 |
| GetHashCode() |
現在のインスタンスのハッシュ コードを返します。 |
| GetMaxByteCount(Int32) |
指定した文字数をエンコードすることによって生成される最大バイト数を計算します。 |
| GetMaxCharCount(Int32) |
指定したバイト数をデコードすることによって生成される最大文字数を計算します。 |
| GetPreamble() |
UTF8Encoding エンコード オブジェクトが UTF-8 形式でエンコードされた Unicode バイト順マークを提供するように構成されている場合、そのようなマークが返されます。 |
| GetString(Byte*, Int32) |
派生クラスでオーバーライドされた場合、指定したアドレスで始まる指定したバイト数を文字列にデコードします。 (継承元 Encoding) |
| GetString(Byte[]) |
派生クラスでオーバーライドされた場合、指定したバイト配列に格納されているすべてのバイトを文字列にデコードします。 (継承元 Encoding) |
| GetString(Byte[], Int32, Int32) |
バイト配列に格納されているある範囲のバイトを文字列にデコードします。 |
| GetString(Byte[], Int32, Int32) |
派生クラスでオーバーライドされた場合、指定したバイト配列に格納されているバイト シーケンスを文字列にデコードします。 (継承元 Encoding) |
| GetString(ReadOnlySpan<Byte>) |
派生クラスでオーバーライドされた場合、指定したバイト スパンに格納されているすべてのバイトを文字列にデコードします。 (継承元 Encoding) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsAlwaysNormalized() |
現在のエンコーディングが、既定の正規形を使用して常に正規化されるかどうかを示す値。 (継承元 Encoding) |
| IsAlwaysNormalized(NormalizationForm) |
派生クラスでオーバーライドされた場合、現在のエンコーディングが、指定した正規形を使用して常に正規化されるかどうかを示す値を取得します。 (継承元 Encoding) |
| MemberwiseClone() |
現在の Object の簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |