Read Special Characters with LabVIEW

Updated Nov 11, 2020

Environment

Software

  • LabVIEW

Operating System

  • Windows

Unicode characters contained in UTF-8 files are not fully supported by LabVIEW and for this reason are sometimes replaced by other characters or symbols.
 

To address this issue, is possible to download a third-party library available in VI Package Manager: NI Unicode Tools. Install it and follow the steps below.

1. On the Block Diagram right click to open the Controls Palette >> File I/O >> Open/Create/Replace File
2. Right click on the File (use dialog) terminal of the Open/Create/Replace File  >> Create Constant
3. Type the path of the UTF-8 file you want to read
4. Right click to open the Controls Palette >> File I/O >> Read Text File and wire it to the Open/Create/Replace File
5. Right click to open the Controls Palette >> Addons >> Unicode >> Convert UTF-8 to LV Text and wire it to the Text terminal of the Read Text File function

6. Right click on the output terminal of Convert UTF-8 to LV Text >> Create Indicator

After you have run the code, the Front Panel will looks like