LabVIEW Web Services with Terminal Inputs and Outputs Do Not Support UTF-8 Strings

Updated Jul 23, 2019

Reported In

Software

  • LabVIEW

Issue Details

LabVIEW Web Services utilizing controls for input and indicators for output do not support UTF-8 string encoding even when the Content-Type is text/plain; charset=utf-8.  My Web service has a requirement for Unicode characters requiring multibyte encoding in UTF-8.  How can I work around this problem and use UTF-8 strings?

Solution

Web method VIs configured to use the Terminal output type will convert all string data into ASCII format. 
  • To output UTF-8 strings you must configured the Web method VI to use Stream output type and the Write Response VI .  Similarly, all string input to a Web method through a LabVIEW control will be converted to ASCII. 
  • UTF-8 strings must be sent to the Web method within POST data. This requires the use of the Read Post Data VI  within your Web method VI.

WAS THIS ARTICLE HELPFUL?

Not Helpful