LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How read data from txt file in Armenian letters | LabView

Solved!
Go to solution

I want to read data from the text file where are Armenian words, but I see only Õ¢Õ¡Ö€Ö‡ Õ€Õ¡ÕµÕ¥Ö€!

How can I solute this problem without changing the config file? because I want my program to work on different computers․

2023-06-22_17-32.png

0 Kudos
Message 1 of 6
(945 Views)

Check this link it may fix your problem Read Special Characters with LabVIEW - NI

 

0 Kudos
Message 2 of 6
(941 Views)
0 Kudos
Message 3 of 6
(939 Views)

2023-06-22_17-59.png

0 Kudos
Message 4 of 6
(920 Views)

I could display Armenian charters but can't read Armenian charts from a text file. 

2023-06-23_08-58.png

0 Kudos
Message 5 of 6
(876 Views)
Solution
Accepted by Petros_Baghalyan

Hi Petros, did you manage to solve this issue yet?

 

The main problem is the text file is UTF-8 encoded, but when writing Unicode to LabVIEW's string controls they require UTF-16LE encoded text. The solution is to change the encoding, either of the text file itself (with Notepad or similar), or of the string once it has been read into LabVIEW. Personally I'd keep the text file as UTF-8, and only convert to UTF-16 for display. NI's Unicode Toolkit allows Unicode conversion to and from ASCII, but not between UTF-8 and UTF-16 AFAIK.

 

I've just published a toolkit called G-Unicode which aims to streamline Unicode handling in LabVIEW and can read, convert, probe, and display Unicode text amongst other things. Here's an example of reading the Armenian text from a UTF-8 encoded file and displaying it in a LabVIEW string control:

 

g-unicode-read-text-file.png

 

The example VI is attached and requires the G-Unicode toolkit (available on VIPM or github) and LabVIEW 2020.

Message 6 of 6
(791 Views)