Hi Communities,
I Encountered some coding problems, it's weired and frustrated.
Background:
Now we must find out where the UTF-8 setting comes from. On the same workstation I would expect your DMS session to be the same SAS installation/configuration. You can check this by looking at the EG's Help --> About. Click Configuration Details and see what the value of SAS System Command is. If it contains a -config option then that option points to a file on your PC that would contain the encoding option currently in effect. Alternatively this file could include another one (with "_usermods" in its name) that sets this option. Can you have a look and paste the value in this conversation? we can then work from there.
Regards,
-- Jan.
Get in contact with your SAS server admin(s), so that your SAS backend is configured to work with UTF-8 globally.
Check for the value of the ENCODING option in your EG workspoace server session. Submit the following code:
proc options option=encoding;
run;
You want this to be
24 proc options option=encoding; run; SAS (r) Proprietary Software Release 9.4 TS1M4 ENCODING=UTF-8 Specifies the default character-set encoding for the SAS session. NOTE: PROCEDURE OPTIONS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
but likely you get
24 proc options option=encoding; run; SAS (r) Proprietary Software Release 9.4 TS1M4 ENCODING=LATIN1 Specifies the default character-set encoding for the SAS session. NOTE: PROCEDURE OPTIONS used (Total process time):
Your SAS administrator will have to make the appropriate changes to the server configuration. This is not a trivial change if this is a server based installation as there is impact on existing data and potentially multiple users will be involved. If you are running a local server you will be the only one but still existing data sets with Latin encoding will have to be migrated or performance will be hurt. So in any case it is not a simple toggle.
Hope this helps,
-- Jan.
Hi jklaverstijn,
Thanks very much for your kindly help.
I checked my setting in EG and it' UTF-8, and the chart label get garbled.
However, in SAS DM, the encoding is EUC-CN, and the chart label shows good.
It seems that the UTF-8 encoding in SAS EG can't encode Chinese characters correctly.
Do you know any way to change the server encoding in SAS EG? I'd like to change the encoding to EUC-CN. it's a local server.
Thank you!
Now we must find out where the UTF-8 setting comes from. On the same workstation I would expect your DMS session to be the same SAS installation/configuration. You can check this by looking at the EG's Help --> About. Click Configuration Details and see what the value of SAS System Command is. If it contains a -config option then that option points to a file on your PC that would contain the encoding option currently in effect. Alternatively this file could include another one (with "_usermods" in its name) that sets this option. Can you have a look and paste the value in this conversation? we can then work from there.
Regards,
-- Jan.
Running the below will tell you where the value was loaded from. Saves a ton of time troubleshooting...
proc options option=encoding value;
run;
Hi jan,
I checked my config followed by the process you listed, found that the config is pointing to UTF-8 config.
C:\PROGRA~1\SASHome\SASFOU~1\9.4\SAS.EXE -config C:\PROGRA~1\SASHome\SASFOU~1\9.4\sasv9.cfg -objectserver -nologo -noterminal -noprngetlist
After that, it occures to me that I have two way to solve my problem:
By the first solution, I followed the method from Chris Hemedinger:
You can change the registered SAS command that SAS Enterprise Guide uses in order to remove the -NOXCMD startup option. But since this involves unseemly interaction with the Windows registry, you might prefer to use a tool that does this for you. I've placed such a tool here. (It's a ZIP file that contains a program and a ReadMe.txt file with instructions.
I changed the command, but it has no effect. I don't know how.
So I switch to the second solution:
changed the sasv9.cfg the EG is currently pointing.
And it worked!
Thanks very much for your assistance!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.