ni / nimi-python

Python bindings for NI Modular Instrument drivers.
Other
111 stars 84 forks source link

windows-1251 is hardcoded in our APIs as the encoding to use #1820

Open ni-jfitzger opened 2 years ago

ni-jfitzger commented 2 years ago

Description of issue

'windows-1251' is hardcoded in our APIs as the encoding to use. We support Linux, as well, so this definitely doesn't seem right.

System report

None

Steps to reproduce issue

Just look at the code.

ni-jfitzger commented 2 years ago

Unfortunately, @marcoskirsch, if we discussed what the correct solution is, I've already forgotten it.

marcoskirsch commented 2 years ago

We need to figure out what the correct encoding in Linux is for our driver runtimes, then select the right encoding based on the platform we're running on.

I think a good way to test is to use two devices whose aliases have non-ascii characters, and confirm we can create sessions and make routes between them.

marcoskirsch commented 2 years ago

Once we get this working right, we should ensure there is unit-test coverage.

bkeryan commented 1 year ago

Note that windows-1251 is for languages that use Cyrillic script, such as Russian, Ukrainian, and Belarusian. You probably meant to hardcode windows-1252, which is roughly equivalent to Latin-1.