Desktop productivity for business analysts and programmers

How to change encoding for a dataset?

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

How to change encoding for a dataset?

Hey guys! Smiley Happy

 

I would like to know if there is any way to change the dataset's encoding. Currently it is in ASCII (or utf-16Ie (I don't know what is that)), which is - I guesss - not supported by Enterprise guide, because it's always throwing an error when I want to make descriptive statistics on (for example) invoice. It says that it is not UTF-8 (to be precise, it says: "failed to transcode data from utf-16Ie(...)"). So I have to change the encoding.

 

And If I am here I would like to ask that, what should I do if it drops error for an importation? I wanted to import the sashelp.class, but it keep yelling that it is NOT a dataset... Any guess?

 

Thank you for your answers. Smiley Happy


Accepted Solutions
Solution
‎04-05-2017 08:09 AM
Contributor
Posts: 21

Re: How to change encoding for a dataset?

I solved it for myself. Smiley Happy Here is the method:

 

1. Go to the location of your SAS.

2. Then go into SASFoundation.

3. Click on 9.4 folder, and after it search the sasv9 file.

4. Open it with ".txt" editor (notepad, note++ etc).

5. Write over th "/en/" to "/u8/".

 

It will solve ALL the problems. Smiley Happy

View solution in original post


All Replies
Solution
‎04-05-2017 08:09 AM
Contributor
Posts: 21

Re: How to change encoding for a dataset?

I solved it for myself. Smiley Happy Here is the method:

 

1. Go to the location of your SAS.

2. Then go into SASFoundation.

3. Click on 9.4 folder, and after it search the sasv9 file.

4. Open it with ".txt" editor (notepad, note++ etc).

5. Write over th "/en/" to "/u8/".

 

It will solve ALL the problems. Smiley Happy

Contributor
Posts: 43

Re: How to change encoding for a dataset?

I already have the utf-8 as encoding in the config file, but still getting the error as below:

 

ERROR: Some character data was lost during transcoding in the data set
       libref.datasetname. Either the data contains characters that are not
       representable in the new encoding or truncation occurred during transcoding.

last section of my config file looks like this:

-FONTSLOC C:\Windows\Fonts
-SET MYSASFILES "?FOLDERID_Documents\My SAS Files\9.4"
-SASUSER "?FOLDERID_Documents\My SAS Files\9.4"
-WORK "!TEMP\SAS Temporary Files"
-MEMSIZE 2G
-SORTSIZE 1G
-TEXTURELOC !SASROOT\common\textures
-SET SASCFG "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8"
-DBCS 
-LOCALE en_US
-ENCODING UTF-8
-SET SAS_NO_RANDOM_ACCESS "1"
-MAPS !SASROOT\maps
-MAPSGFK !SASROOT\mapsgfk
-MAPSSAS !SASROOT\maps
-APPLETLOC "C:\Program Files\SASHome\SASGraphJavaApplets\9.4"

Can you point what is missing or what needs to be amended?

 

-Krisraa

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 751 views
  • 0 likes
  • 2 in conversation