[Форум] [Помощь] [Поиск] [Выйти] |
Добро пожаловать, User |
|
|
| ||
Как средствами .NET вывести набор октетов с текстом в кодировке win1251 на экран или сконвертировать в Unicode? |
| ||
что такое средства .NET ? 1) PSS ID Number: Q241020 HOWTO: Translate Unicode Character Codes to TrueType Glyph Indices in Windows 95 2) .NET Framework Class Library UnicodeCategory Enumeration 3) PSS ID Number: Q138813 HOWTO: Convert from ANSI to Unicode & Unicode to ANSI for OLE 4) PSS ID Number: Q145745 INFO: Function Differences Between Asc/AscB/AscW and Chr/ChrB/ChrW 5) PSS ID Number: Q193540 HOWTO: Read and Display UNICODE String on Visual Basic Form 6) PSS ID Number: Q145727 HOWTO: Call the Unicode Version of an API Function with VB 7) .NET Framework Developer's Guide Parsing Unicode Digits 8) NET Framework Developer's Guide CharSet Object Field 9) .NET Framework Class Library Char Members 10) Visual C++ Concepts: Adding Functionality Unicode Programming Summary 11) .NET Framework Class Library Char Methods ... и конца-края этому не видно... http://msdn.microsoft.com |
| ||
// Угу. Разобрался. Почти. // CSharp byte[] text; // ... // ... System.Text.Encoding encoding = System.Text.Encoding.Default; string strText enconding.GetString(text, 0, TEXT_LENGTH); // А как теперь выбрать именно win1251? Ведь System Default может // быть и не win1251... |
| ||
.NET Framework Class Library Encoding Class .NET Framework Class Library Encoding Members System.Text.Encoding.WindowsCodePage - Gets the Windows operating system code page that most closely corresponds to this encoding. System.Text.Encoding.Convert - Overloaded. Converts a byte array from one encoding to another. |