BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shursulei
Calcite | Level 5
libname x2 postgres server="xxx" port=xx database="xxxx" schema="xxx"
user=xx password="xxx";
The log is as below:

DIAG: ERROR :invalid value for parameter "client_encoding":"lantin1".

I have sas/access to postgresql connect to postresql.I have two ways.I have sas base don't occur the error.

 

But i have eg ,The log is

invalid value for parameter "client_encoding":"lantin1".

1 ACCEPTED SOLUTION

Accepted Solutions
Amir
PROC Star

It looks like your client_encoding parameter has been incorrectly set to "lantin1" (an extra "n"), instead of "latin1".

 

Amir.

View solution in original post

5 REPLIES 5
Amir
PROC Star

It looks like your client_encoding parameter has been incorrectly set to "lantin1" (an extra "n"), instead of "latin1".

 

Amir.

shursulei
Calcite | Level 5
I have set system variable in the sasenv_local.
export PGCLIENTENCODING=latin1.
But the result is also as before.
Amir
PROC Star

If you are getting the same result as before, as you said (invalid value for parameter "client_encoding":"lantin1" with the extra "n") then that indicates another setting has to be changed.

 

Can you add the client_encoding= option to the libname statement as shown in the following link?

 

https://documentation.sas.com/?docsetId=acreldb&docsetTarget=n1q0m2sl5jsi7mn125qfkflg9hfl.htm&docset...

 

 

Amir.

mrityunjaya
Obsidian | Level 7

To Change the Encoding, you can refer my article:

 

https://communities.sas.com/t5/SAS-Communities-Library/Change-Encoding-using-SAS-Enterprise-Guide-Wi...

 

Try the below libname after change the Encoding

 

libname test postgres server="xxx.xx.xxx.xx" port=xxxx user=xxxxxxx password='xxxxxx' database=xxxx schema=xxxxx;

 

Ksharp
Super User

Can you change your SAS encoding into 'utf-8'  ?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2147 views
  • 0 likes
  • 4 in conversation