I had the same trouble about a year ago using Zend_Db and Oracle adapter.

If you are using "oci" you can set the connection information with
environment variables.

/**
 *
 * Oracle Environment Variables.
 *
 * Set the default language and characters as UTF8
 * Set the date format.
 *
 */
putenv("NLS_LANG=AMERICAN_AMERICA.AL32UTF8");
putenv("NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS");

By default, the connection was created using ISO-8859-1, once I changed
the environment variable... every insert and update worked fine.

Note: Make sure your enconding is UTF-8 for php files and input.

I dunno if that works for you or with pdo_oci.

But I highly recommend to use Zend Core for Oracle if you are dealing with
Oracle databases.


> It's an Oracle database. Oops. Missed that piece.
>
> The data is submitted via the web through AMFPHP. The data is in the PHP
> variables correctly. It's just going from $db->insert() to the database it
> gets altered.
>
> ---
> Philip
> [EMAIL PROTECTED]
> http://www.gpcentre.net/
>
>
> On Tue, Aug 5, 2008 at 11:14 AM, Xavier Vidal Piera
> <[EMAIL PROTECTED]>wrote:
>
>> Which database are you using? MySQL, PostgreSQL, Oracle...?
>>
>> Have you tried to specify the client encoding in database connection
>> setup?
>>
>> In MySQLi and PDO_MySQL will be
>> $db->query('SET NAMES UTF8');
>>
>> if you're inserting data with a web form, the page encoding is utf-8?
>>
>>
>> On Tue, Aug 5, 2008 at 18:07, Philip G <[EMAIL PROTECTED]> wrote:
>>
>>> I'm trying to insert a name into our database using the following
>>> call: $db->insert( 'MBR_GEN', $data, 'EML' );
>>>
>>> $data includes the column names to value. One column is 'FIRST_NM' and
>>> the value is: Josué
>>> However, when I insert it into our database, it inserts as: Josu¿¿
>>>
>>> I've even did a var_dump() of $data and it shows fine there. It's only
>>> when I insert. I manually altered the data in the table, and it's
>>> fine. So...our DB seems to support it. Any clue as to why Zend_Db is
>>> altering the value?
>>>
>>> ---
>>> Philip
>>> [EMAIL PROTECTED]
>>> http://www.gpcentre.net/
>>>
>>
>>
>>
>> --
>> Xavier Vidal Piera
>> Enginyer Tècnic Informàtic de Gestió
>> Tècnic Especialista Informàtic d'equips
>> [EMAIL PROTECTED]
>> [EMAIL PROTECTED]
>> http://web.xaviervidal.net
>> 610.68.41.78
>>
>


Reply via email to