French Accents in SAS

Reply
Contributor
Posts: 43

French Accents in SAS

Hi,

 

I'm using a database with french characters in the variables labels (ie. é ). It used to work fine with the old SAS, now on SAS Studio I get this message: Invalid characters were present in the data. 

 

I can't change the label of every variable, I have over 280 variables in the database.

 

Thanks for your help

Super User
Posts: 11,134

Re: French Accents in SAS

Which version was "Old SAS". Which version are you currently using?

What are your current setting for LOCALE and ENCODING? Do you get any messages in the log about encoding for the dataset being different then your current.

 

It may help to post some context from the log along with the complete warning.

Contributor
Posts: 43

Re: French Accents in SAS

[ Edited ]

Hi,

 

the old is SAS 9.4. which is working fine, the new is the SAS Studio, University edition

 

here is the log I get: 

 

61
62 PROC CONTENTS DATA=WORK.cohort2; RUN;
 
ERROR: Invalid characters were present in the data.
ERROR: An error occurred while processing text data.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.04 seconds
cpu time 0.05 seconds
 
NOTE: The SAS System stopped processing this step because of errors.
 
 
 

Capture.PNG
Super User
Posts: 11,134

Re: French Accents in SAS

I don't have SAS UE available but I suspect that the issue revolves around a lack of flexibility in configuration. UE is intended as a learning environment not a for-production installation. So the settings to allow change to the National Language Support (NLS) elements are either missing or reduced. NLS would be where I would look for options to temporarily change locale or language encoding options.

 

 

Contributor
Posts: 43

Handling Invalid Characters in Variable Label

Hi,

 

I'm using a database with french characters in the variables labels (ie. é ). It used to work fine with the old SAS, now on SAS Studio I get this message: Invalid characters were present in the data. 

 

I can't change the label of every variable, I have over 280 variables in the database.

 

Thanks for your help

Super User
Posts: 9,874

Re: French Accents in SAS

How do you transfer sas table ? just copy it into UE ?
That is not right. They have different sas encoding.
Export that table into a CSV/TXT file, then import it by UE. Remember both should use utf-8 encoding.

Or you could try this one:

https://communities.sas.com/t5/SAS-Analytics-U/Connect-to-SQL-Server-Oracle-Database-by-SAS-University-Edition/m-p/273857/highlight/true#M3724 

Ask a Question
Discussion stats
  • 5 replies
  • 439 views
  • 0 likes
  • 3 in conversation