UnicodeEncoding 클래스

정의

유니코드 문자의 UTF-16 인코딩을 나타냅니다.

public ref class UnicodeEncoding : System::Text::Encoding
public class UnicodeEncoding : System.Text.Encoding
[System.Serializable]
public class UnicodeEncoding : System.Text.Encoding
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class UnicodeEncoding : System.Text.Encoding
type UnicodeEncoding = class
    inherit Encoding
[<System.Serializable>]
type UnicodeEncoding = class
    inherit Encoding
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type UnicodeEncoding = class
    inherit Encoding
Public Class UnicodeEncoding
Inherits Encoding
상속
UnicodeEncoding
특성

예제

다음 예제에서는 개체를 사용하여 유니코드 문자 문자열을 바이트 배열로 인코딩하는 UnicodeEncoding 방법을 보여 줍니다. 바이트 배열은 데이터 손실이 없음을 보여 주는 문자열로 디코딩됩니다.

using namespace System;
using namespace System::Text;
using namespace System::Collections;
int main()
{
   
   // The encoding.
   UnicodeEncoding^ unicode = gcnew UnicodeEncoding;
   
   // Create a String* that contains Unicode characters.
   String^ unicodeString = L"This Unicode string contains two characters with codes outside the traditional ASCII code range, Pi (\u03a0) and Sigma (\u03a3).";
   Console::WriteLine( "Original string:" );
   Console::WriteLine( unicodeString );
   
   // Encode the String*.
   array<Byte>^encodedBytes = unicode->GetBytes( unicodeString );
   Console::WriteLine();
   Console::WriteLine( "Encoded bytes:" );
   IEnumerator^ myEnum = encodedBytes->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Byte b = safe_cast<Byte>(myEnum->Current);
      Console::Write( "[{0}]", b );
   }

   Console::WriteLine();
   
   // Decode bytes back to String*.
   // Notice Pi and Sigma characters are still present.
   String^ decodedString = unicode->GetString( encodedBytes );
   Console::WriteLine();
   Console::WriteLine( "Decoded bytes:" );
   Console::WriteLine( decodedString );
}
using System;
using System.Text;

class UnicodeEncodingExample {
    public static void Main() {
        // The encoding.
        UnicodeEncoding unicode = new UnicodeEncoding();
        
        // Create a string that contains Unicode characters.
        String unicodeString =
            "This Unicode string contains two characters " +
            "with codes outside the traditional ASCII code range, " +
            "Pi (\u03a0) and Sigma (\u03a3).";
        Console.WriteLine("Original string:");
        Console.WriteLine(unicodeString);

        // Encode the string.
        Byte[] encodedBytes = unicode.GetBytes(unicodeString);
        Console.WriteLine();
        Console.WriteLine("Encoded bytes:");
        foreach (Byte b in encodedBytes) {
            Console.Write("[{0}]", b);
        }
        Console.WriteLine();
        
        // Decode bytes back to string.
        // Notice Pi and Sigma characters are still present.
        String decodedString = unicode.GetString(encodedBytes);
        Console.WriteLine();
        Console.WriteLine("Decoded bytes:");
        Console.WriteLine(decodedString);
    }
}
Imports System.Text
Imports Microsoft.VisualBasic.Strings

Class UnicodeEncodingExample
    
    Public Shared Sub Main()
        ' The encoding.
        Dim uni As New UnicodeEncoding()
        
        ' Create a string that contains Unicode characters.
        Dim unicodeString As String = _
            "This Unicode string contains two characters " & _
            "with codes outside the traditional ASCII code range, " & _
            "Pi (" & ChrW(928) & ") and Sigma (" & ChrW(931) & ")."
        Console.WriteLine("Original string:")
        Console.WriteLine(unicodeString)
        
        ' Encode the string.
        Dim encodedBytes As Byte() = uni.GetBytes(unicodeString)
        Console.WriteLine()
        Console.WriteLine("Encoded bytes:")
        Dim b As Byte
        For Each b In  encodedBytes
            Console.Write("[{0}]", b)
        Next b
        Console.WriteLine()
        
        ' Decode bytes back to string.
        ' Notice Pi and Sigma characters are still present.
        Dim decodedString As String = uni.GetString(encodedBytes)
        Console.WriteLine()
        Console.WriteLine("Decoded bytes:")
        Console.WriteLine(decodedString)
    End Sub
End Class

다음 예제에서는 인코딩된 바이트를 파일에 쓰고 바이트 스트림에 BOM(바이트 순서 표시)을 접두사로 추가한다는 점을 제외하고 이전 문자열과 동일한 문자열을 사용합니다. 그런 다음 두 가지 방법으로 파일을 읽습니다. 즉, 개체를 사용하여 StreamReader 텍스트 파일로, 이진 파일로 읽습니다. 예상대로 새로 읽은 문자열에는 BOM이 포함되어 있지 않습니다.

using System;
using System.IO;
using System.Text;

public class Example
{
   public static void Main()
   {
        // Create a UTF-16 encoding that supports a BOM.
        Encoding unicode = new UnicodeEncoding();

        // 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 = unicode.GetBytes(unicodeString);
        Console.WriteLine("The encoded string has {0} bytes.\n",
                          encodedBytes.Length);

        // Write the bytes to a file with a BOM.
        var fs = new FileStream(@".\UTF8Encoding.txt", FileMode.Create);
        Byte[] bom = unicode.GetPreamble();
        fs.Write(bom, 0, bom.Length);
        fs.Write(encodedBytes, 0, encodedBytes.Length);
        Console.WriteLine("Wrote {0} bytes to the file.\n", fs.Length);
        fs.Close();

        // 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 = unicode.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 172 bytes.
//
//    Wrote 174 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-16 encoding that supports a BOM.
        Dim unicode As New UnicodeEncoding()
        
        ' 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() = unicode.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(".\UnicodeEncoding.txt", FileMode.Create)
        Dim bom() As Byte = unicode.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(".\UnicodeEncoding.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(".\UnicodeEncoding.txt", FileMode.Open)
        Dim bytes(fs.Length - 1) As Byte
        fs.Read(bytes, 0, fs.Length)
        fs.Close()

        Dim decodedString As String = unicode.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 172 bytes.
'
'    Wrote 174 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 (Σ).

설명

인코딩은 유니코드 문자 집합을 바이트 시퀀스로 변환하는 프로세스입니다. 디코딩은 인코딩된 바이트 시퀀스를 유니코드 문자 집합으로 변환하는 프로세스입니다.

유니코드 표준은 지원되는 모든 스크립트의 각 문자에 코드 포인트(숫자)를 할당합니다. UTF(유니코드 변환 형식)는 해당 코드 포인트를 인코딩하는 방법입니다. 유니코드 표준은 다음 UTF를 사용합니다.

  • UTF-8 - 각 코드 포인트를 1~4바이트 시퀀스로 나타냅니다.

  • UTF-16 - 각 코드 포인트를 1~2개의 16비트 정수 시퀀스로 나타냅니다.

  • UTF-32 - 각 코드 포인트를 32비트 정수로 나타냅니다.

에서 지원하는 System.TextUTF 및 기타 인코딩에 대한 자세한 내용은 .NET Framework 문자 인코딩을 참조하세요.

클래스는 UnicodeEncoding UTF-16 인코딩을 나타냅니다. 인코더는 big endian 바이트 순서(가장 중요한 바이트 우선) 또는 작은 엔디안 바이트 순서(가장 중요하지 않은 바이트 우선)를 사용할 수 있습니다. 예를 들어 라틴 문자 A(코드 포인트 U+0041)는 다음과 같이 직렬화됩니다(16진수).

  • 빅 엔디안 바이트 순서: 00 00 00 41

  • Little endian 바이트 순서: 41 00 00 00

일반적으로 특정 플랫폼의 네이티브 바이트 순서를 사용하여 유니코드 문자를 저장하는 것이 더 효율적입니다. 예를 들어 Intel 컴퓨터와 같은 little endian 플랫폼에서 little endian 바이트 순서를 사용 하는 것이 좋습니다. 클래스는 UnicodeEncoding Windows 코드 페이지 1200(little endian 바이트 순서) 및 1201(big endian 바이트 순서)에 해당합니다. 메서드를 호출 BitConverter.IsLittleEndian 하여 특정 아키텍처의 "endianness"를 확인할 수 있습니다.

필요에 따라 개체는 UnicodeEncoding 인코딩 프로세스에서 발생하는 바이트 시퀀스에 접두사로 사용할 수 있는 바이트 배열인 BOM(바이트 순서 표시)을 제공합니다. 프리앰블에 BOM(바이트 순서 표시)이 포함된 경우 디코더가 바이트 순서와 변환 형식 또는 UTF를 결정하는 데 도움이 됩니다.

UnicodeEncoding instance BOM을 제공하도록 구성된 경우 메서드를 호출 GetPreamble 하여 검색할 수 있습니다. 그렇지 않으면 메서드가 빈 배열을 반환합니다. 개체가 UnicodeEncoding BOM 지원을 위해 구성된 경우에도 인코딩된 바이트 스트림의 시작 부분에 BOM을 적절하게 포함해야 합니다. 클래스의 UnicodeEncoding 인코딩 메서드는 이 작업을 자동으로 수행하지 않습니다.

주의

오류 검색을 사용하도록 설정하고 클래스 instance 보안을 강화하려면 생성자를 호출 UnicodeEncoding(Boolean, Boolean, Boolean) 하고 해당 인수trueUnicodeEncoding 로 설정하여 개체를 throwOnInvalidBytes 인스턴스화해야 합니다. 오류 검색을 사용하면 잘못된 문자 또는 바이트 시퀀스를 검색하는 메서드가 을 ArgumentExceptionthrow합니다. 오류 검색이 없으면 예외가 throw되지 않으며 잘못된 시퀀스는 일반적으로 무시됩니다.

BOM(바이트 순서 표시)을 제공할지 여부, big-endian 또는 little-endian 인코딩을 원하는지 여부, 오류 검색을 사용하도록 설정할지 여부에 따라 여러 가지 방법으로 개체를 인스턴스화 UnicodeEncoding 할 수 있습니다. 다음 표에서는 생성자와 개체를 Encoding 반환하는 속성을 나열 UnicodeEncoding 합니다UnicodeEncoding.

멤버 endian BOM 오류 검색
BigEndianUnicode Big-endian Yes 아니요(대체 대체)
Encoding.Unicode 리틀 엔디안 아니요(대체 대체)
UnicodeEncoding.UnicodeEncoding() 리틀 엔디안 아니요(대체 대체)
UnicodeEncoding(Boolean, Boolean) 구성 가능 구성 가능 아니요(대체 대체)
UnicodeEncoding.UnicodeEncoding(Boolean, Boolean, Boolean) 구성 가능 구성 가능 구성 가능

GetByteCount메서드는 유니코드 문자 집합을 인코딩할 바이트 수를 결정 하 고 GetBytes 메서드는 실제 인코딩을 수행 합니다.

마찬가지로 메서드는 GetCharCount 바이트 시퀀스를 디코딩하는 데 발생하는 문자 수를 결정하고 및 GetCharsGetString 메서드는 실제 디코딩을 수행합니다.

여러 블록(예: 100,000자 세그먼트로 인코딩된 100만 문자 문자열)에 걸쳐 있는 데이터를 인코딩하거나 디코딩할 때 상태 정보를 저장할 수 있는 인코더 또는 디코더의 경우 및 GetDecoder 속성을 각각 사용합니다GetEncoder.

생성자

UnicodeEncoding()

UnicodeEncoding 클래스의 새 인스턴스를 초기화합니다.

UnicodeEncoding(Boolean, Boolean)

UnicodeEncoding 클래스의 새 인스턴스를 초기화합니다. 매개 변수를 사용하여 big endian 바이트 순서를 사용할지 여부와 GetPreamble() 메서드를 통해 유니코드 바이트 순서 표시를 반환할지 여부를 지정할 수 있습니다.

UnicodeEncoding(Boolean, Boolean, Boolean)

UnicodeEncoding 클래스의 새 인스턴스를 초기화합니다. 매개 변수를 사용하여 big endian 바이트 순서를 사용할지 여부, 유니코드 바이트 순서 표시를 제공할지 여부 및 잘못된 인코딩이 검색되었을 때 예외를 발생시킬지 여부를 지정할 수 있습니다.

필드

CharSize

유니코드 문자 크기를 바이트 단위로 나타냅니다. 이 필드는 상수입니다.

속성

BodyName

파생 클래스에서 재정의되면 메일 에이전트 본문 태그에 사용할 수 있는 현재 인코딩의 이름을 가져옵니다.

(다음에서 상속됨 Encoding)
CodePage

파생 클래스에서 재정의되면 현재 Encoding의 코드 페이지 식별자를 가져옵니다.

(다음에서 상속됨 Encoding)
DecoderFallback

현재 DecoderFallback 개체에 대한 Encoding 개체를 가져오거나 설정합니다.

(다음에서 상속됨 Encoding)
EncoderFallback

현재 EncoderFallback 개체에 대한 Encoding 개체를 가져오거나 설정합니다.

(다음에서 상속됨 Encoding)
EncodingName

파생 클래스에서 재정의되면 현재 인코딩에 대해 사람이 읽을 수 있는 설명을 가져옵니다.

(다음에서 상속됨 Encoding)
HeaderName

파생 클래스에서 재정의되면 메일 에이전트 헤더 태그에 사용할 수 있는 현재 인코딩의 이름을 가져옵니다.

(다음에서 상속됨 Encoding)
IsBrowserDisplay

파생 클래스에서 재정의되면 현재 인코딩을 브라우저 클라이언트가 내용을 표시하는 데 사용할 수 있는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
IsBrowserSave

파생 클래스에서 재정의되면 현재 인코딩을 브라우저 클라이언트가 내용을 저장하는 데 사용할 수 있는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
IsMailNewsDisplay

파생 클래스에서 재정의되면 현재 인코딩을 메일 및 뉴스 클라이언트가 내용을 표시하는 데 사용할 수 있는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
IsMailNewsSave

파생 클래스에서 재정의되면 현재 인코딩을 메일 및 뉴스 클라이언트가 내용을 저장하는 데 사용할 수 있는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
IsReadOnly

파생 클래스에서 재정의되면 현재 인코딩이 읽기 전용인지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
IsSingleByte

파생 클래스에서 재정의되면 현재 인코딩이 단일 바이트 코드 포인트를 사용하는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Encoding)
Preamble

개체가 하나를 제공하도록 구성된 경우 UTF-16 형식으로 인코딩된 유니코드 바이트 순서 표시를 가져옵니다.

Preamble

파생 클래스에서 재정의할 경우, 사용된 인코딩을 지정하는 바이트 시퀀스를 포함하는 범위를 반환합니다.

(다음에서 상속됨 Encoding)
WebName

파생 클래스에서 재정의되면 현재 인코딩에 대해 IANA(Internet Assigned Numbers Authority)에 등록된 이름을 가져옵니다.

(다음에서 상속됨 Encoding)
WindowsCodePage

파생 클래스에서 재정의되면 현재 인코딩과 가장 비슷한 Windows 운영 체제 코드 페이지를 가져옵니다.

(다음에서 상속됨 Encoding)

메서드

Clone()

파생 클래스에서 재정의되면 현재 Encoding 개체의 부분 복사본을 만듭니다.

(다음에서 상속됨 Encoding)
Equals(Object)

지정한 Object이(가) 현재 UnicodeEncoding 개체와 같은지 여부를 확인합니다.

GetByteCount(Char*, Int32)

지정한 문자 포인터에서 시작되는 문자 집합을 인코딩할 경우 생성되는 바이트 수를 계산합니다.

GetByteCount(Char*, Int32)

파생 클래스에서 재정의되면 지정한 문자 포인터에서 시작하는 문자 집합을 인코딩하여 생성되는 바이트 수를 계산합니다.

(다음에서 상속됨 Encoding)
GetByteCount(Char[])

파생 클래스에서 재정의되면 지정한 문자 배열의 모든 문자를 인코딩하여 생성되는 바이트 수를 계산합니다.

(다음에서 상속됨 Encoding)
GetByteCount(Char[], Int32, Int32)

지정한 문자 배열의 문자 집합을 인코딩할 경우 생성되는 바이트 수를 계산합니다.

GetByteCount(ReadOnlySpan<Char>)

파생 클래스에서 재정의할 경우, 지정된 문자 범위의 문자를 인코딩하여 생성되는 바이트 수를 계산합니다.

(다음에서 상속됨 Encoding)
GetByteCount(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>)

파생 클래스에서 재정의할 경우, 지정된 읽기 전용 범위의 문자 집합을 바이트 범위로 인코딩합니다.

(다음에서 상속됨 Encoding)
GetBytes(String)

지정된 문자열의 문자 집합을 지정된 바이트 배열로 인코딩합니다.

GetBytes(String)

파생 클래스에서 재정의되면 지정한 문자열의 모든 문자를 바이트 시퀀스로 인코딩합니다.

(다음에서 상속됨 Encoding)
GetBytes(String, Int32, Int32)

파생 클래스에서 재정의할 경우, 지정된 index에서 시작하여 지정한 문자열 내에서 count로 지정된 문자의 수를 바이트 배결로 인코딩합니다.

(다음에서 상속됨 Encoding)
GetBytes(String, Int32, Int32, Byte[], Int32)

지정된 String의 문자 집합을 지정된 바이트 배열로 인코딩합니다.

GetCharCount(Byte*, Int32)

지정한 바이트 포인터에서 시작되는 바이트 시퀀스를 디코딩할 경우 생성되는 문자 수를 계산합니다.

GetCharCount(Byte*, Int32)

파생 클래스에서 재정의되면 지정한 바이트 포인터에서 시작하는 바이트 시퀀스를 디코딩하여 생성되는 문자 수를 계산합니다.

(다음에서 상속됨 Encoding)
GetCharCount(Byte[])

파생 클래스에서 재정의되면 지정한 바이트 배열의 모든 바이트를 디코딩하여 생성되는 문자 수를 계산합니다.

(다음에서 상속됨 Encoding)
GetCharCount(Byte[], Int32, Int32)

지정한 바이트 배열의 바이트 시퀀스를 디코딩할 경우 생성되는 문자 수를 계산합니다.

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>)

파생 클래스에서 재정의할 경우, 지정된 읽기 전용 바이트 범위의 모든 바이트를 문자 범위로 디코딩합니다.

(다음에서 상속됨 Encoding)
GetDecoder()

UTF-16으로 인코딩된 바이트 시퀀스를 유니코드 문자 시퀀스로 변환하는 디코더를 가져옵니다.

GetEncoder()

유니코드 문자 시퀀스를 UTF-16으로 인코딩된 바이트 시퀀스로 변환하는 인코더를 가져옵니다.

GetEncoder()

파생 클래스에서 재정의되면 유니코드 문자 시퀀스를 인코딩된 바이트 시퀀스로 변환하는 인코더를 가져옵니다.

(다음에서 상속됨 Encoding)
GetHashCode()

현재 인스턴스의 해시 코드를 반환합니다.

GetMaxByteCount(Int32)

지정한 수의 문자를 인코딩할 경우 생성되는 최대 바이트 수를 계산합니다.

GetMaxCharCount(Int32)

지정한 수의 바이트를 디코딩할 경우 생성되는 최대 문자 수를 계산합니다.

GetPreamble()

이 인스턴스의 생성자가 바이트 순서 표시를 요청하는 경우 UTF-16 형식으로 인코딩된 유니코드 바이트 순서 표시를 반환합니다.

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)
TryGetBytes(ReadOnlySpan<Char>, Span<Byte>, Int32)

대상이 충분히 큰 경우 지정된 읽기 전용 범위의 문자 집합을 바이트 범위로 인코딩합니다.

(다음에서 상속됨 Encoding)
TryGetChars(ReadOnlySpan<Byte>, Span<Char>, Int32)

대상이 충분히 큰 경우 지정된 읽기 전용 범위에서 바이트 집합을 chars 범위로 디코딩합니다.

(다음에서 상속됨 Encoding)

확장 메서드

GetBytes(Encoding, ReadOnlySequence<Char>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>Byte 배열로 인코딩합니다.

GetBytes(Encoding, ReadOnlySequence<Char>, IBufferWriter<Byte>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>byte로 디코딩하고 결과를 writer에 씁니다.

GetBytes(Encoding, ReadOnlySequence<Char>, Span<Byte>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>byte로 인코딩하고 결과를 bytes에 출력합니다.

GetBytes(Encoding, ReadOnlySpan<Char>, IBufferWriter<Byte>)

지정된 Encoding을 사용하여 지정된 ReadOnlySpan<T>byte로 인코딩하고 결과를 writer에 씁니다.

GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>char로 디코딩하고 결과를 writer에 씁니다.

GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>char로 디코딩하고 결과를 chars에 출력합니다.

GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>)

지정된 Encoding을 사용하여 지정된 ReadOnlySpan<T>char로 디코딩하고 결과를 writer에 씁니다.

GetString(Encoding, ReadOnlySequence<Byte>)

지정된 Encoding을 사용하여 지정된 ReadOnlySequence<T>String으로 디코딩합니다.

적용 대상

추가 정보