- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello all of my friend , hope all of you are very well. I have a dataset contained German alphabets in Customer Name column. special German alphabet is distorted in dataset and all the reports and list taken from that.(as you see in the screen shot below). I use sas studio university edition.
I am looking forward your answers..
Thank you and deeply appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1. Change Sas encoding option so that it supports non native characters
2. Try using varchar instead of string for column informats and formats
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS UE uses UTF-8 encoding.
It looks like your data set uses sometime else.
1. Do you have any messages in the log?
2. Run proc contents and report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Does the dataset look right when viewed in SAS Studio?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello and thank you very much for your reply. I have just SAS university edition.
Thank you again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS Studio is the user interface used in University Edition.
PS it is the second tab in the screenshot you posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello and thank you very much for your answer, yes the German alphabets are distorted in SAS studio tab too.
Thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This has happened to me, when I got data that had been previously transferred incorrectly between Latin and UTF8.
The following code fixed it for me.
/* adjust the following to add all corrupted German char variables */
%let vars_with_corrupted_chars=name address ;
data corrected;
set has_incorrect_german_chars;
array __array_char_vars $ &vars_with_corrupted_chars.;
/* following code using explicit special characters is a LOT faster than the
equivalent code below using hex values */
__array_char_vars = prxchange('s/Ä/Ä/',-1,__array_char_vars);
__array_char_vars = prxchange('s/ä/ä/',-1,__array_char_vars);
__array_char_vars = prxchange('s/€Ã/ä/',-1,__array_char_vars);
__array_char_vars = prxchange('s/Ö/Ö/',-1,__array_char_vars);
__array_char_vars = prxchange('s/ö/ö/',-1,__array_char_vars);
__array_char_vars = prxchange('s/ü/ü/',-1,__array_char_vars);
__array_char_vars = prxchange('s/Ü/Ü/',-1,__array_char_vars);
__array_char_vars = prxchange('s/ÃŒ/ü/',-1,__array_char_vars);
__array_char_vars = prxchange('s/ß/ß/',-1,__array_char_vars);
__array_char_vars = prxchange('s/é/É/',-1,__array_char_vars);
__array_char_vars = prxchange('s/²/2/',-1,__array_char_vars);
__array_char_vars = prxchange('s/³/3/',-1,__array_char_vars);
__array_char_vars = prxchange("s/´/'/",-1,__array_char_vars);
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi and thank you very much for your reply
Where should I insert the codes?
Thank you again
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content