Issues can occur with non UTF-8 files, projects, or programs in SAS® Enterprise Guide® 8.6


The default encoding in SAS Enterprise Guide 8.6 changed to UTF-8. As a result, issues can occur with non UTF-8 files, programs, and other SAS Enterprise Guide projects that reference non UTF-8 files. 

For example, the following issues might occur when opening existing SAS code or a SAS Enterprise Guide project that references external programs where program file encoding is not set to the default encoding of UTF-8:

There is no indication that a workaround is needed. No warnings or errors occur. However, special characters might be displayed incorrectly in the Program Editor, and results might be incorrect or incomplete.

Workaround

To circumvent this issue, do any of the following:

Solution: New Default Encoding Configuration Option - SAS Enterprise Guide 8.6 

A SAS Enterprise Guide 8.6 update is available that enables you to change the default encoding in SAS Enterprise Guide 8.6 to match the program encoding that is used.

Add the appSettings DefaultEncoding to the SAS Enterprise Guide 8.6 SEGuide.exe.config file (the default path is C:\Program Files\SASHome\SASEnterpriseGuide\8\SEGuide.exe.config) as per the following example:

<appSettings>

<add key="DefaultEncoding" value="<Encoding name or CodePage>" />

</appSettings>

Added appSettings DefaultEncoding to the SAS Enterprise Guide 8.6 SEGuide.exe.config

See Encoding.GetEncodings Method (System.Text) | Microsoft Learn for valid encoding names. You can enter either “identifier and name” or “CodePage”. (SAS Technical Support strongly recommends that you use the number for the code page.)

If you do not specify a Default Encoding value in the SEGuide.exe.config file, or if you specify an invalid value, SAS Enterprise Guide will continue to use the default encoding of UTF-8.

Other Possible Workarounds

File "Open as Program with encoding" 

Select File ► Open ► Browse ► Open as: Program with encoding ► and select the correct encoding for the file being opened. 

Note that you will be unable to drag and drop files if you use this workaround. Instead, you must choose the correct encoding manually. In addition, a problem would occur when opening existing SAS Enterprise Guide projects that reference non UTF-8 code.

Server Files

Open files via the server, which matches the encoding of the session. This method avoids the problem of incorrect characters. Opening files from the server (SASApp) ensures that the encoding matches the session.

Convert the Program Encoding

Save the program, which corrects all characters and saves the files in UTF-8 encoding using third-party tools such as Notepad++.