DB2 connection: Setting codepage

From: Date: Thu, 21 Jan 2010 18:32:38 +0000
Subject: DB2 connection: Setting codepage
Groups: php.db 
Request: Send a blank email to php-db+get-46779@lists.php.net to get a copy of this message
Hi all, I have some code that has to insert data into databases (DB2 AS400) coming from multilingual sources. The code on the Webserver is the same; that's why i can not use solution involving php configuration. For example: User 1 (English) logs into the application and submits some info (uploaded from an excel file); the program inserts it in the corresponding DB => OK. User 2 (Russian) logs in and submits his data => KO. I read the excel (Cp1251) fine but the insertion seems to be faulty (destination is CCSID 1025). I've seen db_client_info() function which tells the code page used; but how to set the code page before connecting (with db2_connect() ). Thans in advance, /Ahmed

« previous php.db (#46779) next »