BookmarkSubscribeRSS Feed
JUN_Sands
Calcite | Level 5

Hi All,

I am trying to import excel / text file with Chinese characters but the outcome is filled with " ??????? ".

Does anyone have an idea how to display Chinese characters properly in SAS?

Thanks.

9 REPLIES 9
jakarman
Barite | Level 11

Use an Unicode version (DBCS utf8) of your sas.exe. With some luck it is on your system.

The default en-language setting single byte will never process Chinese chars

---->-- ja karman --<-----
JUN_Sands
Calcite | Level 5

Thanks for the reply, but no luck...

Ksharp
Super User

Change your SAS process's  Language  as  locale=zh_cn    or  encoding='utf8'  .

I forgot how to change it . search it at support.sas.com

JUN_Sands
Calcite | Level 5

I have 9.4 and not sure the language package or language support program was installed or not. Do I need to install any of those? because ENCODING='UTF-8' didn't work.

Haikuo
Onyx | Level 15

When deploying SAS, the default/mandatory supporting language is English with some optional languages including Simplified Chinese. Unless it is checked/selected, I don't see how you get to read Chinese characters. So start with your SAS admin or whoever installed your SAS, or if you have access to deployment summary: SAS(R) 9.3 Guide to Software Updates 

jakarman
Barite | Level 11

When it is windows., look at the location

SAShome\SAS Foundation\..\nls\u8

When it is Unix a similar location with the other  /.

When that is there utf8 is present. The next one is getting it started. When not the installation has to be adjusted.

---->-- ja karman --<-----
JUN_Sands
Calcite | Level 5

There is no SAS Foundation. What am I missing here?

Ksharp
Super User

Check how to start SAS with utf-8 at :

National Language Support

(NLS)

Reference Guide

You can change it at CONFIG file or

Start it with command .But Jaap pointed out , you should check it firstly .

"C:\Program Files\SAS\SASFoundation\9.2(32-bit)\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2(32-bit)\nls\zh\SASV9.CFG" -encoding utf-8

and Check its LOG:

1    proc options option=encoding;

2    run;

     SAS (R) PROPRIETARY SOFTWARE RELEASE 9.2 

ENCODING=UTF-8    Specifies default encoding for internal processing of data.

NOTE: 鈥淧ROCEDURE OPTIONS鈥濇墍鐢ㄦ椂闂达紙鎬诲鐞嗘椂闂达級:

      瀹為檯鏃堕棿          0.01 绉?

      CPU 鏃堕棿          0.01 绉?

Xia Keshan

jakarman
Barite | Level 11

You are missing the real  location as that one can vary. Running a "proc options;run;" will show all settings and there should be namings like the one mentioned having the full name.
SAS 9.4 is a nice version as you are supposing to install them I assume you are on a open Windows desktop. Then with the that setup instaltation the language support is mentioned.
But check it before as it could be there having the Foundation location found.

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 4828 views
  • 7 likes
  • 4 in conversation