Special characters not reading correctly from SQL

Reply
Senior User
Posts: 1

Special characters not reading correctly from SQL

I am getting incorrect characters in text fields when I request data from MS SQL Server using SAS Grid on Linux. Special characters such as ñ are showing up as Ã± and ó is coming out as Ã³.  I do not get these errors when using WIndows PC SAS 9.4 requesting the same data from the same database.  Any ideas on how to fix this from within SAS? I can look at my data using a SQL CLI on Linux and the characters look correct from there.

Grand Advisor
Posts: 9,578

Re: Special characters not reading correctly from SQL

It is encoding problem. Your SAS's encoding is different from SQL's encoding. Change it in SASENV_LOCAL file .
Respected Advisor
Posts: 3,836

Re: Special characters not reading correctly from SQL

As @Ksharp writes highly likely the NLS_LANG setting in sasenv_local

 

See discussion here: https://communities.sas.com/t5/SAS-Procedures/conversion-latin-and-date-proc-sql-from-oracle/m-p/302...

 

Ask a Question
Discussion stats
  • 2 replies
  • 542 views
  • 0 likes
  • 3 in conversation