Vincent
Vincent

Reputation: 1

Querying Pervasive Database PSQL with PHP ODBC driver

I am connecting to a PSQL database through PHP and can successfully pull down data, but I am having problems with certain characters such as:

× ÷ °

If I use the PSQL Control Center I can see those characters, but when I pull them through PHP they are unreadable. Any suggestions for what I can do with PHP odbc to make sure they appear correctly?

$connection = odbc_connect($dsn, $user, $password);

$results = odbc_exec($connection, 'SELECT * FROM table');

while($row = @odbc_fetch_array($results)) {
    print_r($row);
}

Upvotes: 0

Views: 221

Answers (1)

luis.parravicini
luis.parravicini

Reputation: 1217

I would say it has to do with the encoding of the database and/or the returned string in php. They both should match.

Upvotes: 1

Related Questions