Desktop productivity for business analysts and programmers

Encoding Error

Reply
Occasional Contributor
Posts: 5

Encoding Error

Hi,

I use the import data due a OCBC connection function to import SQL Tables to the process flow in SAS Enterprise Guide.

Everything is fine during the import process and I can see and open the data in the tables, but when I try to use the query builder to join some of the tables I get an error.

Please check the picture below:

http://s14.directupload.net/images/140403/jqzhwbx4.jpg

"Failed to transcode data from UTF8 to U_Latin1_CE" and so on.

What can I do to fix the problem or is it possible to turn the transcoding process off?

Thanks in advance.

Best,

Simon

Super User
Posts: 7,435

Re: Encoding Error

It looks like the database you are connecting to uses the UTF-8 character set, which has characters that are not part of the Latin1 character set that your SAS session uses. When EG encounters one of these, it throws the error.

You might want to review this thread:

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 5

Re: Encoding Error

Hi,

I would try this option:

"First, if you need to routinely work with characters that map outside of wlatin1, consider using -ENCODING UTF-8 as SAS startup option.  If you don't want to change your server from wlatin1 for most scenarios, consider setting up a second logical SAS workspace definition (ex: "SASApp UTF8") that looks exactly like your main SAS workspace except for the encoding options.    You can use it specifically for this operation to get your data into SAS, and then use your other workspace definition for everything else.  This can be done in SAS Management Console -- no additional configuration, software, or hardware is needed.  You're simply defining a different SAS Workspace with an alternative startup command."



But where can I change the encoding at the startup to UTF-8 environment?


Thanks.


Best,


Simon

PROC Star
Posts: 1,146

Re: Encoding Error

It depends on how you're running your SAS session underneath your Enterprise Guide program. It's either on your local PC, or on a remote server. If the bottom right of your EG screen looks like this:

NoProfile.png

then it's a local session, otherwise it's a server. Post back which it is, and we'll figure it out.

Tom

Occasional Contributor
Posts: 5

Re: Encoding Error

Iam running my session on a remote server:

sas_connection.JPG

PROC Star
Posts: 1,146

Re: Encoding Error


The implication of this is that your SAS session is being run on a remote server. My understanding is that the ENCODING system option needs to be specified when the SAS session starts, which is the first time that you access the server from Enterprise Guide.

My first suggestion is that you take this question to the person or group who manages your SAS environment, and see what their preference is for setting this option. Alternately, it is possible to supply a configuration file for non-standard options, but this would require that you have access to your home directory on the server.

I'm not sure about your familiarity with these issues, so I've provided a fairly terse description. If this is gobbledegook, I can expand on the parts that aren't clear.

Tom

Valued Guide
Posts: 3,208

Re: Encoding Error

As it is at the server part we still no know wich kind of server Windows or Unix. That does not make really difference,

You platform admin has setup the workspace server you are using. At that side, the server, the SAS installation is done. When the installation is supporting multi-languages with Utf-8 ans additional workspace server can be configured supporting utf-8. The goals is: you will see several workspace servers with you Eguide connection. You can choose from them.

The Unix-code SAS session will support the DBCS K-functions from the NLS guide.

The latin1 SAS session will support the old classic SAS string fucntions.  

see: SAS(R) 9.4 National Language Support (NLS): Reference Guide, Second Edition

Yes there is a difference in SAS language conventions to give attention. That is probably why most SAS sessions are still latin1 and not utf-8. Confusing as many systems (internet. MS-office, --) are already utf-8. When you get a character not present in the limited 255 number of latin-1, that character can not give a place. utf-8 is possible 4-byte not always 1 byte. And there are some more differences to common expectations.      

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 6 replies
  • 3551 views
  • 0 likes
  • 4 in conversation