ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP, LabVIEW, and Unicode problems

I need a bit of help...

 

Background:
I am trying to integrate with a CM's system, which is halfway around the world. I have have to VPN and RDP into their network to try things out. Also, the deployment PC does not have LV development environment installed so I am building an exe ever time I make a change.

 

I have several disadvantages working against me:
1) This is probably the second time I have put the "\httpClient\POSTBuffer.vi" on a block diagram (The first time was many years ago and didn't end well either.)
2) This is the first time I had to deal with Unicode. I think LV is making things worse.

 

Problem:
I want my LV code to output the same thing as the PowerShell script. (See image below)

Frozen_0-1712338330015.png

 

 

Here is a chopped up image (yes, an picture) of my code... (to protect the innocent.)

Frozen_1-1712338381527.png

 

 

You can see that the code is "working" in that it is returning "HTTP/1.1 200 OK..." along with some text in the body.

 

Things I have done or tried:
I have put the "UseUnicode=True" token into my LabVIEW ini file as well as the deployment app ini file (Is there a LV ini file for run-time?)
I have turned on "Forced Unicode Text" in the body string indicator.
I can copy the PS terminal text from the deployment PC into my LV dev environment string indicator successfully. So I know the string indicator is capable of displaying the correct characters.
Probably more things that I have tried the I do not recall since I am upto rev 7 of my code already.

 

Things I have not tried:
Calling a Power Shell script... I would rather use a native LV solution. Plus, it is requires more trial and error exe's being built. 🤢

 

Any ideas on what I am missing? or more specifically, how I can get it to work?

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
Currently using LabVIEW 2022
0 Kudos
Message 1 of 5
(1,887 Views)
  1. The "Force Unicode Text" only has an effect when typing characters into a string control.
  2. The HTTP strings are probably UTF-8; whereas LabVIEW uses UTF-16 LE.  You might be able to use the attached files to build a converter.
  3. There is a text property paul_a_cardinale_0-1712345065251.png.

This is like font properties in that it can be different for different characters.  When writing this property, it only affects the selected characters paul_a_cardinale_1-1712345176046.png.

The following, once executed, will set a string control to always interpret everything as Unicode:

paul_a_cardinale_2-1712345348005.png

Download All
Message 2 of 5
(1,859 Views)

Thanks for the insights.

I will try them out.

 

However, can you back save those attachments to 2020 please?

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
Currently using LabVIEW 2022
0 Kudos
Message 3 of 5
(1,844 Views)

Here.

Download All
0 Kudos
Message 4 of 5
(1,840 Views)

Hey guys,

 

in case that somebody still looks for a solution (the solution above adds "space" characters after each char), you can use a LabVIEW internal solution:

Jenso_0-1770371573372.png

 

Best Regards,

JensDeBaer

0 Kudos
Message 5 of 5
(980 Views)