|
Dieser Artikel wurde manuell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen.
|
Übersetzung
Original
|
UTF32Encoding-Klasse
Assembly: mscorlib (in mscorlib.dll)
Der UTF32Encoding-Typ macht die folgenden Member verfügbar.
| Name | Beschreibung | |
|---|---|---|
![]() | UTF32Encoding() | |
![]() | UTF32Encoding(Boolean, Boolean) | |
![]() | UTF32Encoding(Boolean, Boolean, Boolean) |
| Name | Beschreibung | |
|---|---|---|
![]() | BodyName | |
![]() | CodePage | |
![]() | DecoderFallback | |
![]() | EncoderFallback | |
![]() | EncodingName | |
![]() | HeaderName | |
![]() | IsBrowserDisplay | |
![]() | IsBrowserSave | |
![]() | IsMailNewsDisplay | |
![]() | IsMailNewsSave | |
![]() | IsReadOnly | |
![]() | IsSingleByte | |
![]() | WebName | |
![]() | WindowsCodePage |
| Name | Beschreibung | |
|---|---|---|
![]() | Clone | |
![]() | Equals | |
![]() | Finalize | |
![]() | GetByteCount(Char[]) | |
![]() | GetByteCount(String) | |
![]() | GetByteCount(Char*, Int32) | |
![]() | GetByteCount(Char[], Int32, Int32) | |
![]() | GetBytes(Char[]) | |
![]() | GetBytes(String) | |
![]() | GetBytes(Char[], Int32, Int32) | |
![]() | GetBytes(Char*, Int32, Byte*, Int32) | |
![]() | GetBytes(Char[], Int32, Int32, Byte[], Int32) | |
![]() | GetBytes(String, Int32, Int32, Byte[], Int32) | |
![]() | GetCharCount(Byte[]) | |
![]() | GetCharCount(Byte*, Int32) | |
![]() | GetCharCount(Byte[], Int32, Int32) | |
![]() | GetChars(Byte[]) | |
![]() | GetChars(Byte[], Int32, Int32) | |
![]() | GetChars(Byte*, Int32, Char*, Int32) | |
![]() | GetChars(Byte[], Int32, Int32, Char[], Int32) | |
![]() | GetDecoder | |
![]() | GetEncoder | |
![]() | GetHashCode | |
![]() | GetMaxByteCount | |
![]() | GetMaxCharCount | |
![]() | GetPreamble | |
![]() | GetString(Byte[]) | |
![]() | GetString(Byte[], Int32, Int32) | |
![]() | GetType | |
![]() | IsAlwaysNormalized() | |
![]() | IsAlwaysNormalized(NormalizationForm) | |
![]() | MemberwiseClone | |
![]() | ToString |
Big-Endian-Bytereihenfolge: 00 00 00 41 Little-Endian-Bytereihenfolge: 41 00 00 00
Hinweis |
|---|
using System; using System.Text; public class SamplesUTF32Encoding { public static void Main() { // Create an instance of UTF32Encoding using little-endian byte order. // This will be used for encoding. UTF32Encoding u32LE = new UTF32Encoding( false, true ); // Create two instances of UTF32Encoding using big-endian byte order: one with error detection and one without. // These will be used for decoding. UTF32Encoding u32withED = new UTF32Encoding( true, true, true ); UTF32Encoding u32noED = new UTF32Encoding( true, true, false ); // Create byte arrays from the same string containing the following characters: // Latin Small Letter Z (U+007A) // Latin Small Letter A (U+0061) // Combining Breve (U+0306) // Latin Small Letter AE With Acute (U+01FD) // Greek Small Letter Beta (U+03B2) // a high-surrogate value (U+D8FF) // a low-surrogate value (U+DCFF) String myStr = "za\u0306\u01FD\u03B2\uD8FF\uDCFF"; // Encode the string using little-endian byte order. byte[] myBytes = new byte[u32LE.GetByteCount( myStr )]; u32LE.GetBytes( myStr, 0, myStr.Length, myBytes, 0 ); // Decode the byte array with error detection. Console.WriteLine( "Decoding with error detection:" ); PrintDecodedString( myBytes, u32withED ); // Decode the byte array without error detection. Console.WriteLine( "Decoding without error detection:" ); PrintDecodedString( myBytes, u32noED ); } // Decode the bytes and display the string. public static void PrintDecodedString( byte[] bytes, Encoding enc ) { try { Console.WriteLine( " Decoded string: {0}", enc.GetString( bytes, 0, bytes.Length ) ); } catch ( System.ArgumentException e ) { Console.WriteLine( e.ToString() ); } Console.WriteLine(); } }
Windows 7, Windows Vista SP1 oder höher, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core wird nicht unterstützt), Windows Server 2008 R2 (Server Core wird mit SP1 oder höher unterstützt), Windows Server 2003 SP2
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
