ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
440 stars 154 forks source link

Support Non-ASCII Characters for User-Provided String #518

Closed charitylxy closed 7 months ago

charitylxy commented 7 months ago

What does this Pull Request accomplish?

This PR aims to address the issue brought up in https://github.com/ni/nidaqmx-python/issues/384 and https://github.com/ni/nidaqmx-python/issues/384

Why should this Pull Request be merged?

What testing has been done?

Manually tested on command line with non ASCII string argument.

>>> import nidaqmx.system
>>> d = nidaqmx.system.Device ("장치")
>>> d.serial_num
0
charitylxy commented 7 months ago

Not sure if it's appropriate to still load nicaiu.dll while encoding strings to utf-8 but seems like it's working on my end even without changing it to nicai_utf8.dll.

charitylxy commented 7 months ago

Adding python-decouple dependency in https://github.com/ni/nidaqmx-python/pull/524. Regression tests will fail for now until https://github.com/ni/nidaqmx-python/pull/524 is merged in.