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'  ?