Ce contenu n’est pas disponible dans votre langue préférée.

Le contenu est disponible dans une autre langue. Votre navigateur peut inclure des fonctionnalités qui vous aideront à traduire le texte.

TestStand LabVIEW UI Crashes When Using Chinese Characters

Updated Nov 2, 2023

Reported In

Software

  • TestStand
  • LabVIEW

Other

  • Notepad++
  • Microsoft Windows™

Issue Details

  • I am localizing TestStand™ to Chinese. When I try to run the shipped TestStand LabVIEW™ User Interface (UI), it crashes. Why?
  • TestStand is using Chinese localization but the Chinese characters aren't appearing correctly. How can I fix this?
  • After modifying the INI language files in TestStand and running the source code for the LabVIEW UI, LabVIEW crashes. Can I fix this?
  • Using UTF-8 Unicode to display Chinese causes my TestStand LabVIEW UI to crash. Is this expected behaviour?

Solution

This article refers to the shipping example of the TestStand LabVIEW UI. However, the steps for resolution still apply to custom made TestStand LabVIEW UIs.

LabVIEW can crash or display incorrect Chinese characters when using the "Beta: Use Unicode UTF-8 for worldwide language support" Windows option. This is expected behaviour since LabVIEW does not currently support Unicode. In the LabVIEW 2020 f1 release, this issue was addressed to prevent crashes. However, using the UTF-8 Unicode option is still unsupported and causes undesired behaviour.

The following methods can resolve this issue:
 
  1. Disabling the Unicode UTF-8 option in Windows.
    • This method will stop LabVIEW from crashing. However, some language characters may display incorrectly after this.
  2. Use a Chinese version of Windows.
  3. Using the GB2312 encoding method.
    • This is an alternative encoding option that has been found to work in some cases of localization.
This article will detail the steps to resolve this issue using each of the above methods.
 

Disabling the Unicode UTF-8 Option

Following these steps will prevent LabVIEW from crashing. However, some language characters may display incorrectly after implementing this solution.

1. In the Windows Start Menu, search for Region Settings and select Additional date, time & regional settings, as shown:
Region Settings.png

2. In the popup window, select Change date, time or number formats.

clock and region settings.png

3. In the Region window, navigate to the Administrative tab. 
4. Click on Change system locale...

region window.png

5. in the Region Settings window, disable the Beta: Use Unicode UTF-8 for worldwide language support option, as shown below:

utf 8 option.png

6. Restart the computer to implement the new settings.
 

Using a Chinese Version of Windows

To change the start-up language of a Windows installation, refer to the Add languages to Windows Setup article by Microsoft.
 

Using GB2312 Encoding

This method is not guaranteed to work. However, it has been used to successfully localize the TestStand LabVIEW UI in some specific cases.

1. Download and install Notepad++.
  • This is a free, 3rd party software that allows for source code editing.
2. Run Notepad++.
3. Open a new file by navigating to File >> New.
4. In the new file, change the encoding method to GB2312:
  • Navigate to Encoding >> Character sets >> Chinese >> GB2312 (Simplified) as shown below.
  • It is essential that this encoding option is selected prior to writing or copying any characters into the Notepad++ page.

notepad encoding.png

5. Save the file as the TestStand INI file that requires modification.
6. Write the Chinese characters into the Notepad++ INI file.
  • The below example shows that the UIControlStrings.ini file has been modified to include Chinese text in some of the File menu items.

notepad chinese.png

7. Save this file in the TestStand language directory.