Страница: 1 |
Вопрос: VBNet, кодировка | Добавлено: 18.05.10 17:48 |
Автор вопроса: ![]() |
Создаю программу для работы с текстовыми файлами. (Использую My.Computer.Filesystem). По умолчанию используется UTF-8, из-за чего все кириллические символы не отображаются.
Как сменить кодировку? texts = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName.ToString)
writearea.Text = texts.ToString Спасибо. |
Ответы | Всего ответов: 2 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() ![]() Вопросов: 58 Ответов: 4255 ![]() |
Профиль | Цитата | #1 | Добавлено: 18.05.10 18:08 |
public static string ReadAllText(string path, System.Text.Encoding encoding) Member of System.IO.File Summary: Opens a file, reads all lines of the file with the specified encoding, and then closes the file. Parameters: path: The file to open for reading. encoding: The encoding applied to the contents of the file. Returns: A string containing all lines of the file. |
Номер ответа: 2 Автор ответа: ![]() ![]() ![]() ![]() ![]() Вопросов: 4 Ответов: 42 |
Web-сайт: Профиль | Цитата | #2 | Добавлено: 18.05.10 18:13 |
Спасибо, это действительно работает.
|
Страница: 1 |
|