danikf / tik4net

Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Apache License 2.0
174 stars 93 forks source link

Encoding problem #60

Closed niphone closed 5 years ago

niphone commented 5 years ago

I call the SSID field in the CapsManRegistrationTable through the API. Since the SSID contains Chinese characters, the displayed SSID result has an unrecognized question mark.

connection.Encoding = Encoding.GetEncoding("windows-1250");

Use connection.Encoding = Encoding.GetEncoding("windows-1250"); An error message appears: System.ArgumentException: 'windows-1250' is not a supported encoding name. For information on defining a custom encoding

Thank you so much!

danikf commented 5 years ago

Hi, use Chinese encoding and not eastern europe encoding (windows1250). D

niphone commented 5 years ago

connection.Encoding = Encoding.GetEncoding("utf-8"); Still not, the characters displayed are still question marks.

danikf commented 5 years ago

Hi, Utf8 is not good idea. You must use your real encoding (and test it via winbox before - not sure if chinese works with mikrotik at all). D