How to use special charactes in psqlodbc driver password - postgresql

In Postgres psqlodbc driver using special characters in connection string password like
sqlstringconnect('DRIVER={PostgreSQL Unicode};PWD=pü')
or in url encoded form
sqlstringconnect('DRIVER={PostgreSQL Unicode};PWD=p%C3%BC')
throws password error.
According to
https://www.postgresql-archive.org/Problem-with-special-characters-in-password-when-using-SQLDriverConnect-td5755239.html
and
https://www.url-encode-decode.com
PWD=p%C3%BC
should accepted as pü
How to use special characters in passwords ?
Client application is Microsoft Visual Foxpro 9
Using Postgres 13.1 with 32-bit psqlodbc driver 13.00.0000 in Windows 10 non-unicode application where system locale is Windows-1257 (Baltic Windows)

Related

"isc_attach_database failed" error FlameRobin for connect Firebird database

I'm trying setup Firebird 2.5 with FlameRobin 0.9.3, installed on Windows 10 64bit. The .fdb files are on the same disk of the Firebird machine and the FlameRobin program.
I'm trying to connect EMPLOYEE.FDB file with FlameRobin getting this error.
My settings for this database file below.
I never changed my sysdba password. Is it due to this error ODBC driver?
Edit: I've created a new database on ISQL to try. Username: SYSDBA Password: 31202333
But I am getting same error on FlameRobin.
The error means that your username does not exist (unlikely for SYSDBA), or the password is incorrect*. In Firebird, passwords are system wide, not per database. Check your password (default installations of Firebird on Windows use the password 'masterkey'). Otherwise try resetting the password using gsec.
The fact it might work with ISQL, is that you're using a local path, which may cause ISQL to use Firebird embedded mode, and in embedded mode on Windows, the password is ignored (on the assumption that if you have filesystem access to the database file, you are allowed to open database). I guess that, if instead of 'D:\sq\sample.fdb', you'd use 'localhost:D:\sq\sample.fdb' in ISQL, you would get the same error as in FlameRobin.
*: In Firebird 3 and later it can also mean that the user does not exist for the authentication plugins tried, even though the user may exist for a different authentication plugin.

How to set Client_Encoding

I'm using NodeJS to get some data from a PostgreSQL database and render it on the web. When I make a query on SQL Shell(psql) everything looks fine but when I console.log that same data from NodeJS, all the special characters are replaced with gibberish.
The encoding for this database is
- Encoding: UTF8
- Collation: French_France.1252
- Ctype: French_France.1252
I tried to set Client_Encoding to UTF8 but when I reconnect to the database I find out that it is still not set.
Also I get this warning each time I connect to the database (Just in case it may cause smth)
WARNING: Console code page (850) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
My OS is Windows 8 and PostgreSQL version is 10.x.
After a long search I have found a solution that I want to share now.
Change your ODBC DSN connection string to include this: ConnSettings=SET CLIENT_ENCODING TO 'UTF8';

PHP 5.6 ODBC returns a special character array for string values from database?

array result from odbc Im accessing the intersystem cache database via unix odbc and displaying the details in the website (PHP). Recently I have upgraded the PHP to 5.6 version. Im getting nondisplayable characters (�) for only strings but the numbers and date fields are display correctly. I`m running the website in Apache 2.4 in Debian 8 machine. Intersystem cache database is running in Debian 6 machine.
Note:every time the characters changing randomly.

Retrieve multilingual data (Chinese, Japanese...) from SQL Server 2008 R2 and display in Java webapp

I have Chinese data in my db and I need to display it in my Java web app. However I am getting ??? as output.
Database Used: SQL Server 2008 R2 (nvarchar datatype is used in order to support Unicode data and db is created with default collation name i.e. SQL_Latin1_General_CP1_CI_AS and there is no problem while storing the data in db).
Development Environment: Window 7
Treegrid is used to display data.
I have already:
1. set charset and pageEncoding to UTF-8 in my HTML, jsp and Java
pages.
2. Updated my jdbc connection with useUnicode=true;characterEncoding=UTF-8;.
3. Configured Tomcat’s server.xml connector to use UTF-8 (URIEncoding="UTF-8").
I have once set collation_name to Latin1_General_CI_AI still it's not working.
Latin1_General_CI_AI --> There's part of your problem. Latin1 has nothing to do with Unicode. Getting "???" means there's an encoding problem somewhere in your toolchain, where your UTF-8 data gets scrambled into another encoding.

ODBC Connection to Access 2007 on WinXP

Is it possible to have an ODBC connection to a MS Access 2007 database on Windows XP without having any other database engine (i.e. Microsoft.ACE.OLEDB.12.0) installed?
I am using the following connection string which works on Windows 7 but not on Windows XP. (There is only *.mdb option in Data Sources (ODBC) control panel in Windows XP and no *.accdb option is there but both exist on Windows 7.):
connectionString = "Driver={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=|DataDirectory|Database1.accdb"
You can download drivers: http://www.microsoft.com/downloads/details.aspx?FamilyID=7554f536-8c28-4598-9b72-ef94e038c891&displaylang=en