Invalid Characters in the Current Charset/Encoder in LabWindows™/CVI

Updated Jan 3, 2024

Reported In

Software

  • LabWindows/CVI

Issue Details

  • I am trying to compile a code in LabWindows™/CVI that contains native characters from a language different than mine and I am getting the following message:
  • I was provided with a code from another language and translate it to mine in LabWindows™/CVI and I am getting the following message when trying to compile it:
The file contains characters that are invalid in the current charset/encoding and were replaced with '?'. The first invalid character is located at line xx, column xx. The file has been set to read-only. Opening the file with a different charset/encoding might fix the problem.
 
image.png

Solution

This message is caused due to LabWindows™/CVI having a default charset that does not have the invalid characters defined. Change the default charset to a different one that includes the invalid characters from your code. For example, the western charset includes characters from languages such as German and French that are not included in other charsets. 

To change the default charset follow the next steps:

For LabWindows™/CVI 2019 version or earlier

1. Go to Options>>Font.
2. In the Environment Font Preferences pop-up window check the Source Window Font box and click Edit
image.png
3. Change the default charset.
 

For LabWindows™/CVI 2020

1. Go to Options>>Environment.
2. In the Environment pop-up window locate the Encoding section.
image.png
3. In the Character set for interpreting ANSI settings option, change the default charset.

Additional Information

A character set refers to the composite number of different characters used and supported by a computer software and hardware. It consists of codes, bit patterns, or natural numbers used to define a particular character.