Desktop productivity for business analysts and programmers

National characters translated to english characters in views

Reply
New Contributor
Posts: 2

National characters translated to english characters in views

Hi!

I have this problem where the national Swedish characters å, ä, ö in our database are displayed as a, a, o in my views in SAS EG. For example, two of the values of the variable COLOR is 'Ljusröd' and 'Mörkröd' but in my views and when i write SQL querys they are listed as 'Ljusrod' and 'Morkrod'. I know the ö is there in the database because on other SAS clients at the company the national characters are present. Sometimes when i try to select entries where COLOR='Ljusrod' I get no results no matter if I write 'Ljusröd' or 'Ljusrod' which is very wierd, because inte the view there are plenty of 'Ljusrod'.

I have both Swedish and English versions of SAS 9.4 installed though I'm not sure where to check which one EG uses. The interface in EG is in Swedish. I have tried the options validvarname=any and locale=Swedish, but to no avail.

Does anyone have any idea what could be wrong?

Thanks!

SAS Super FREQ
Posts: 271

Re: National characters translated to english characters in views

Hi!  When you say "in my views", exactly which UI features of EG are you referring to?  The Query Builder?  Filter and Sort?  The data grid?  I ran this code in EG 7.11 (with EG display language set to Swedish):

data blah;
infile datalines dsd;
input color $;
datalines;
Ljusröd
Mörkröd
;
run;


And then used the resultant data set in the Query Builder and in Filter and Sort, and the values displayed as expected in the UI:
Untitled.png

Also, submit this to see what your server locale and encoding options are set to:

proc options group=languagecontrol;
run;
New Contributor
Posts: 2

Re: National characters translated to english characters in views

Thanks for the replies!

By views I mean SAS tables which are "views" towards the database, I'm not technical or proficient in English enough to explain it better. But basically it's tables containing national characters which are displayed without them in SAS EG.

I ran proc options in and it returned:

ENCODING=WLATIN1  Specifies the default character-set encoding for the SAS session.

LOCALE=SV_SE           Specifies a set of attributes in a SAS session that reflect the language,

                                      local conventions, and culture for a geographical region.

Valued Guide
Posts: 3,206

Re: National characters translated to english characters in views

Eguide is supporting utf8 that is for all languages. There cannot be a problem with that.

Eguide is connecting to a SAS session running in some language setting it can be utf8 in multi byte setting or a classic single byte one to be configured with a language encoding.

That Sas session is connecting to the dbms client with a sas/access interface. That dbms client is going to the dbms.

In your dbms setup it set back to a classic 7bit Ascii setting. Ask the person that did the server installation why he did that and not the nls settings.

---->-- ja karman --<-----
Esteemed Advisor
Posts: 6,661

Re: National characters translated to english characters in views

Compare the settings of the other clients, where the characters work, with yours. And also have a look at the DB client setup on those machines. You may have some conversion going on there before the data actually reaches SAS.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Valued Guide
Posts: 3,206

Re: National characters translated to english characters in views

Ok your sas session is a single byte Latin1 se encoding.

That is not the problem. I was asking for the dbms client and sas/access combination. The dbms will also be no problem. It is in between those.

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