Displaying Non-English Characters in LabVIEW

Updated Nov 23, 2020

Environment

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

I want to read in a file that contains non-English characters into LabVIEW. When I do this, some of the characters are replaced by question marks even though the characters were displayed correctly in my file. Can I display these characters correctly in LabVIEW? 



 

Some Windows settings will need to be modified in order to set the Regional and Language Options to the appropriate settings.

The following steps use Vietnamese as an example:

1. Go to the Control Panel by clicking Start»Setting»Control Panel and open Regional and Language Options.



2. Go to the Languages Tab and check the box marked "Install files for complex script and right to left language (Including Thai)."



Note: You may need a Windows XP disk to complete this. Reboot your computer.

3. Go back to Start»Settings»Control Panel»Regional and Language Options. On the Regional Options tab, select Vietnamese.



4. Set up the system locale to use Arabic also by going to the Advanced tab and selecting Vietnamese.



5. Click OK and reboot when prompted. 

6. Return to the Languages Tab. In order to actually type in Arabic you will need to enable an Input Method Editor (IME). On the languages tab, click the Details button.



7. Add your input editor for Vietnamese. 



8. Enable the language bar by clicking the Language Bar button



9. Display the Language Bar on the desktop.



10. Now you can pick which language you want to work in from the desktop.



Once these settings are implemented, go back to the file you are reading from and delete the offending characters. Replace the characters after choosing that language from the Language Bar on the desktop. 

You should now be able to import the characters in the file correctly into LabVIEW.

Additional Information

 

Note 1: You cannot use Unicode-only languages with LabVIEW using the above settings. The specific language will not be an available option in the Language for non-Unicode Programs field. To see a list of Unicode-only languages, check Languages and International Servicing Command-Line Options

For Windows 7 Ultimate and Enterprise (LabVIEW 2009 and 2010) users, they can choose a display language with the steps shown above. If the language files are missing, those users can download some of the common libraries, found here.

Note 2: Localizing block diagram strings will break VIs any time there is logic associated with the string. For example if there is a string wired to a case structure it may not execute the same case as the unlocalized version.

Note 3: String Functions on the Block Diagram are not Multibyte aware. That is, some of the string functions could end up splitting a character made of more than one byte. We also do not consider the locale when  comparisons, etc. are done. To conclude, string functions work on bytes and not characters
Note 4: Modify the LabVIEW .ini configuration file, using the following steps:
Navigate to C:\Program Files\National Instruments\<LabVIEW>\LabVIEW.ini. Add UseUnicode=TRUE to any new line in the LabVIEW .ini file. Save the file and exit LabVIEW. Upon relaunching LabVIEW, the Unicode characters should work correctly, whether typing or pasting in.
Note: LabVIEW Linux Real Time targets store the configuration file in this location:  /etc/natinst/share/lvrt.conf