I am trying to do some processing of sentences in Turkish, and I am using a text file for a database. But I can not read Turkish characters from a text file, because of this I can not process the data correctly.
string[] Tempdatabase = File.ReadAllLines(@"C:\Users\dialogs.txt"); textBox1.Text = Tempdatabase[5];
Output:
You can use Encodingas much as you want. This may ultimately lead to the expected result, but keep in mind that this may not work with other files.
Encoding
# , Unicode . , - , :
( ) UTF-8. - . , # , , . , .
UTF-8, # .
.html Visual Studio, , ( ASCII)
.html
, . .
var Tempdatabase = File.ReadAllLines(@"C:\Users\dialogs.txt", Encoding.GetEncoding("iso-8859-9"));
, . - ,.net Unicode . :
Unicode (, utf8), .
, :
string[] Tempdatabase = File.ReadAllLines(@"C:\Users\dialogs.txt", Encoding.Default);
Windows.
string[] Tempdatabase = File.ReadAllLines(@"C:\Users\dialogs.txt", Encoding.GetEncoding("Windows-1254");
, Microsoft.