Import excel or text file with chinese language

Reply
Contributor
Posts: 22

Import excel or text file with chinese language

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.

Trusted Advisor
Posts: 3,212

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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 --<-----
Contributor
Posts: 22

Re: Import excel or text file with chinese language

Thanks for the reply, but no luck...

Super User
Posts: 10,023

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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

Contributor
Posts: 22

Re: Import excel or text file with chinese language

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.

Respected Advisor
Posts: 3,156

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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 

Trusted Advisor
Posts: 3,212

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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 --<-----
Contributor
Posts: 22

Re: Import excel or text file with chinese language

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

Super User
Posts: 10,023

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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

Trusted Advisor
Posts: 3,212

Re: Import excel or text file with chinese language

Posted in reply to JUN_Sands

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 --<-----
Ask a Question
Discussion stats
  • 9 replies
  • 1785 views
  • 6 likes
  • 4 in conversation