am trying to find a way to instruct ODBC drivers - Datadirect ODBC to use win1251 for client session.
There are for ways mentioned in USer Guide:
But as far as i understand options 1 and 3 in not suitable for ODBC drivers, option 2 I am also could not use - because i use SAS and this engine doesn't allow me to execute manually edited SQL's - it use a lot of automatic codegeneration.
I have tried option client_encoding in postgresql.conf file, moreover I have tired to execute follow clommand in psql admin session: alter user sasuser SET client_encoding to WIN1251;
but nothing changes - by default client encoding is still UTF8
...
currently in Datadirect ODBC.ini file i have follow string:
IANAAppCodePage=2251
Could somebody help me please?
This should definitely do the trick:
ALTER USER sasuser SET client_encoding TO WIN1251;
Only remaining explanations can be:
client_encoding
is explicitly set to another value.To find out, set log_statements = all
, make the server cluster reload, start a session with your user-unfriendly tool, and check the database log, if and what was actually communicated to the server.
Don't forget to reset log_statements
or your log files will grow huge.
Or it is all just a typo in Datadirect ODBC.ini
:
IANAAppCodePage=2251
That supposed to be 1251?
Nope. IANAAppCodePage MIBenum 2251
stands for "WINDOWS_1251". That's not it.