1

 avatar
ketronix
csharp
2 years ago
608 B
7
Indexable
Never
using System.Text;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("User-Agent", "C# console program");

var content = await client.GetByteArrayAsync("https://cist.nure.ua/ias/app/tt/f?p=778:201:236137349662833:::201:P201_FIRST_DATE,P201_LAST_DATE,P201_GROUP,P201_POTOK:31.10.2022,04.11.2022,10304333,0");

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
var encoding = Encoding.GetEncoding("windows-1254");

var result = Encoding.Convert(encoding, Encoding.UTF8, content);

string resString = encoding.GetString(result, 0, result.Length);

Console.WriteLine(resString);