Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

charitylxy
Copy link
Collaborator

@charitylxy charitylxy commented Feb 26, 2024

What does this Pull Request accomplish?

This PR aims to address the issue brought up in #384 and #384

  • Currently, user-provided strings only accept ASCII characters.
  • This change will allow non-ASCII characters for user-provided strings.

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
Copy link
Collaborator Author

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 charitylxy marked this pull request as ready for review February 26, 2024 06:35
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
@charitylxy charitylxy requested a review from bkeryan February 29, 2024 03:20
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
@charitylxy charitylxy requested a review from bkeryan March 1, 2024 16:25
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
@charitylxy charitylxy mentioned this pull request Mar 2, 2024
1 task
@charitylxy
Copy link
Collaborator Author

charitylxy commented Mar 2, 2024

Adding python-decouple dependency in #524. Regression tests will fail for now until #524 is merged in.

@charitylxy charitylxy requested review from bkeryan and zhindes March 2, 2024 08:10
Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this PR looks good but the rename to .env.sample slipped through the cracks. We should also document it as if it is a sample. Hopefully this will be the last round of changes.

src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
src/handwritten/_lib.py Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
generated/nidaqmx/_lib.py Outdated Show resolved Hide resolved
@charitylxy charitylxy force-pushed the users/charitylxy/support-internalization branch from 76d36cb to f2ea31d Compare March 4, 2024 01:09
@charitylxy charitylxy requested a review from bkeryan March 4, 2024 02:43
@charitylxy charitylxy merged commit 981e45f into ni:master Mar 4, 2024
16 checks passed
@charitylxy charitylxy deleted the users/charitylxy/support-internalization branch March 7, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants