Skip to content

fix: Encode strings as UTF-8#464

Merged
bkeryan merged 3 commits intomasterfrom
users/bkeryan/utf-8
Jul 30, 2025
Merged

fix: Encode strings as UTF-8#464
bkeryan merged 3 commits intomasterfrom
users/bkeryan/utf-8

Conversation

@bkeryan
Copy link
Copy Markdown
Collaborator

@bkeryan bkeryan commented Jul 28, 2025

What does this Pull Request accomplish?

Update SetLVString and GetLVString to convert to/from UTF-8 using ConvertSystemStringToUTF8 and ConvertUTF8StringToSystem.

Add two test cases:

  • Test_HelloWorld_Internationalization.vi tests the HelloWorld client+server with internationalized strings. Unfortunately, this test still passes without the fix because both the client and server use the same incorrect string encoding.
  • Test_HelloWorld_Utf8Encoding.vi packs a helloworld.HelloRequest to Any, searches for the UTF-8 encoded string, and unpacks it and compares the result. This test fails without the fix.

Why should this Pull Request be merged?

Closes #461

What testing has been done?

Ran new tests on LabVIEW 2019.

@bkeryan bkeryan requested a review from jasonmreding July 28, 2025 23:10
@bkeryan bkeryan merged commit 2203993 into master Jul 30, 2025
5 checks passed
@bkeryan bkeryan deleted the users/bkeryan/utf-8 branch July 30, 2025 01:10
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.

grpc-labview serializes strings using the ANSI code page, not UTF-8

2 participants