0

I want to use .Net Core to write a software that connects to a measuring device, reads data and reads/writes parameters from/to the device. The device supports the Windows-1252 code page for its string parameters.

Is it possible to decode these strings using System.Text.Encoding even on a RasPi with Ubuntu 16.04?

MSDN has a list of supported encodings for .NET Core here https://msdn.microsoft.com/en-us/library/system.text.encodingprovider(v=vs.110).aspx which does not include Windows-1252 but ISO-8859-1. While this may decode most of the characters correctly it has reserved codes that have useful characters in Windows-1252 (f.e. the € character).

The second question would be: .NET Core claims to support the mentioned list of encodings but does thas depend on the underlying operating system? Does it support the encodings on all operating systems which can run .NET Core?

NicolasR
  • 2,222
  • 3
  • 23
  • 38
  • 1
    Killing off these legacy encodings was a pretty laudable goal, only way to get rid of this never-ending headache. You'll just have to provide your own if you want to use them anyway. 1252 is pretty close to 8859-1 so consider [this approach](https://stackoverflow.com/a/43598303/17034). – Hans Passant Aug 09 '17 at 11:19
  • Interesting approach! Thanks for that. – NicolasR Aug 09 '17 at 15:17

0 Answers0