From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unflatten from JSON does not work with extended ASCII

Solved!
Go to solution

Hi,

 

I am trying to use Unflatten from JSON with extended ASCII charecters. Apparently it does not work.

My trials are like this,

1)VI Snippet.png

This does not unflatten and return an error as LabVIEW:  The JSON string is invalid. JSON strings must be encoded in UTF-8 and must conform to the JSON grammar.

 

2) 

VI Snippet2.png

This works and returns the value as 201.

 

Can anyone help me to understand why my first trial does not work ?

 

Mirash

Coding is a combination of intelligent and creative work - someone
0 Kudos
Message 1 of 3
(5,318 Views)
Solution
Accepted by topic author Mirash

Hello,

 

When you try your first trial, it doesn't work because the UTF-8 format doesn't support the stress on letters like "é" "è" "à" for instance, that's why it's returning the error as explained in this document.

 

UTF-8 Encoding Debugging Chart:

http://www.i18nqa.com/debug/utf8-debug.html

 

Here is a link to help you and see how it converts the stress in UTF-8, this link will allow you to check the syntax of your string using the example providing by shb posted the 12-04-2009.

 

Re: undocumented function "text to utf-8":

http://forums.ni.com/t5/LabVIEW/undocumented-function-quot-text-to-utf-8-quot/m-p/1034616#M460673

 

Regards,

 

RojoRak

Message 2 of 3
(5,260 Views)

Thanks RojoRak. It works..:)

 

Mirash

Coding is a combination of intelligent and creative work - someone
0 Kudos
Message 3 of 3
(5,242 Views)