I have a user with a spreadsheet containing the following type of cell where the "equal to" line is hovered under the "greater than" symbol. None of the XLSX or PCFILES related engines we've tried in SAS9.4 seem to handle the translation where this special symbol isn't lost or converted to "?".
Age ≥85 years (vs. 60-69) |
Any suggestions on how to maintain the original?
Thanks in advance.
Your SAS session needs to run with UTF-8 encoding to import such characters successfully.
The likely cause is that your SAS session runs single byte with an encoding like wlatin1 (ISO-8859-1) for which there is no character for ≥.
The following will show you under which encoding you're running SAS.
proc options GROUP=LANGUAGECONTROL;
run;
And this wiki page lets you check if you can map a multibyte character to your current character set.
If my assumption is correct then the only way to get around this is to run your SAS session in multi-byte mode preferably using UTF-8.
Okay, this makes sense. I've tried adding OPTIONS ENCODING="UTF-8" ; to my autoexec script but it doesn't want to change my setting away from the default "LATIN1" definition that's always been the encoding scheme of our Linux based configuration.
Also tried -ENCODING="UTF-8" inside of sasv9.cfg configuration file but similarly isn't being recognized by new sessions when checking LanguageControl group settings. I'm unsure what I'm missing in the syntax as either of those launch file settings should suffice......right?
You cannot change it in the autoexec file. That is too late.
It has to be set at the startup.
In theory changing it in sasv9.cfg should work, but if it is set on the command line that starts the SAS session then the setting on the command line will override that. So I suspect that is what is happening to you.
How are you running SAS?
Are you using Display Manager on your own PC?
Are you using Display Manager on a server? Windows or Linux?
Are you using some front-end tool to run SAS? SAS/Studio? Or Enterprise Guide? Something else?
If you have a SAS admin ask them for help.
Normally a PC install will create both a SAS (English) and SAS (Unicode) start menu entries.
Enterprise Guide at the UI, making a call to Grid configuration running on Linux (RHEL7). I am the SAS admin but we haven't edited our setup in 10+ years, since our gov't agency cut funding. it has made me rusty.
I shall look into other files that could be called after the sasv9_usermods.cfg file which was my attempted edit on an admin service we use for testing purposes only. That is supposed to be one of the final invoked config files but something else must be the mix that I'm overlooking. Just want to give the UTF8 suggestion a fair test as it sounds promising. Thx!
Make a completely new application server instance that is running with encoding=UTF-8 so that you can pick which one you want to connect to in your EG project. That will both be easier to setup and better for the users.
Okay, I'm confused by what this log on my ADMIN configured app server is telling me. The CONFIG setting shows the processing order as follows and that final "sasv9_usermods.cfg" file is where I have my -SET encoding "UTF-8" statement defined. Given that SAS should take the final encountered system option as it goes through each supplied file, I would think this is the proper place to make that desired definition to further my tests on reading the special symbol.
proc options option=(config encoding ) value ;
Option Value Information For SAS Option CONFIG
Value: (
/app/sas/install/SASFoundation/9.4/sasv9.cfg
/app/sas/install/SASFoundation/9.4/nls/en/sasv9.cfg
/app/sas/install/SASFoundation/9.4/sasv9_local.cfg
/app/shared/sasconfig/gridconfig/Lev1/ADMIN/sasv9.cfg
/app/shared/sasconfig/gridconfig/Lev1/ADMIN/sasv9_usermods.cfg /app/shared/sasconfig/gridconfig/Lev1/ADMIN/WorkspaceServer/sasv9.cfg
/app/shared/sasconfig/gridconfig/Lev1/ADMIN/WorkspaceServer/sasv9_usermods.cfg
)
Scope: SAS Session
How option value set: Internal
Option Value Information For SAS Option ENCODING
Value: LATIN1
Scope: SAS Session
How option value set: Config File
Config file name:
/app/sas/install/SASFoundation/9.4/nls/en/sasv9.cfg
Yet, the same app server session tells me the ENCODING option is being set from the first .cfg file in the above listed order. I've also tried adding the option to the launch command inside the app server definition in the metadata repository, to no positive affect.
Not sure what I'm overlooking here, open to suggestions.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.