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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1875 views
  • 0 likes
  • 4 in conversation