V
V
Vladimir Yurchenkov2021-12-07 16:17:35
C++ / C#
Vladimir Yurchenkov, 2021-12-07 16:17:35

How to do encoding mapping?

Hey! Good people, tell me how to implement a comparison of server encodings with windows encodings?

When connecting, the server returns the result of the request in cp1251 encoding, and on Windows it is called windows-1251.
My application connects to the Sybase server using AdoNetCore.AseClient.
The author in this topic wrote that he fixed such a problem, but it does not work for me.

At what stage and how exactly should I write a comparison?

{"cp1251", () => Encoding.GetEncoding("windows-1251")}


I found a magic line on this issue, but unfortunately, it will not be cold or hot for the .Net Framework project:

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question