[PHP-DB] Probleme upper accents

2013-04-05 Thread André LAGADEC

Hi,

On my application PHP with Oracle database, all work fine with Oracle9i 
client, but when I test with Oracle11gR2 client

I get warning with PDO driver.
*Warning*: PDOStatement::fetch() [function.PDOStatement-fetch 
http://vanves23/function.PDOStatement-fetch]: column 0 data was too 
large for buffer and was truncated to fit it in

with this request
 SELECT DISTINCT UPPER(SUBSTR(NOM, 1, 1)) AS INITIALE, NOM
   FROM MY_TABLE ORDER BY INITIALE ;

The field NOM contain in first character upper character with accent 
like this


É

Î

Here are my configuration :
   - Apache2.2.21
   - Php-5.1.4 with PDO Oracle
   - Client Oracle 11.2.0.1
   - Base Oracle 11.2.0.1
On my Web server, I have set :
ORACLE_BASE
ORACLE_HOME
TNS_ADMIN
NLS_LANG = French_France.WE8ISO8859P1
LC_ALL=fr_FR
LC_COLLATE=fr_FR.ISO8859-1
LC_CTYPE=fr_FR.ISO8859-1
LC_MESSAGES=fr
LC_MONETARY=fr_FR.ISO8859-1
LC_NUMERIC=fr_FR.ISO8859-1
LC_TIME=fr_FR.ISO8859-1

In HTML headers of page, there is
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=fr lang=fr
 head
  meta http-equiv=Content-Type content=text/html; charset=utf-8 /

And on my Oracle Dababase server, I have
NLS_CHARACTERSET=WE8ISO8859P15
NLS_NCHAR_CHARACTERSET= AL16UTF16

How I can suppress these warnings ?

Thanks for your help.



Re: [PHP-DB] Probleme upper accents

2013-04-05 Thread Toby Hart Dyke


It looks similar to this bug: http://bugs.php.net/bug.php?id=54379 - 
possibly fixed in a later version? Your PHP is pretty elderly.


  Toby


On 4/5/2013 1:38 PM, André LAGADEC wrote:

Hi,

On my application PHP with Oracle database, all work fine with 
Oracle9i client, but when I test with Oracle11gR2 client

I get warning with PDO driver.
*Warning*: PDOStatement::fetch() [function.PDOStatement-fetch 
http://vanves23/function.PDOStatement-fetch]: column 0 data was too 
large for buffer and was truncated to fit it in

with this request
 SELECT DISTINCT UPPER(SUBSTR(NOM, 1, 1)) AS INITIALE, NOM
   FROM MY_TABLE ORDER BY INITIALE ;

The field NOM contain in first character upper character with accent 
like this


É

Î

Here are my configuration :
   - Apache2.2.21
   - Php-5.1.4 with PDO Oracle
   - Client Oracle 11.2.0.1
   - Base Oracle 11.2.0.1



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Probleme upper accents

2013-04-05 Thread Matijn Woudt
On Fri, Apr 5, 2013 at 3:19 PM, Toby Hart Dyke t...@hartdyke.com wrote:


 It looks similar to this bug: 
 http://bugs.php.net/bug.php?**id=54379http://bugs.php.net/bug.php?id=54379- 
 possibly fixed in a later version? Your PHP is pretty elderly.

   Toby



I would suggest to upgrade the full system.
LC_* shows the OS is using ISO-8859-1, which is extremely outdated.  It
should use UTF-8 of course, or at least the ISO-8859-15.
The database uses ISO-8859-15, and then you output it to the browser
(without converting it I assume), and you tell the browser it is UTF-8 data?

About your problem, it seems Toby is right about the bug report. It seems
it has not been fixed yet, there is a patch but devs didn't find I good
enough it. You might want to look at the options to use an ISO-8859-15
connection instead of UTF-8 while the bug has not been fixed.

- Matijn


Re: [PHP-DB] Probleme upper accents

2013-04-05 Thread Christopher Jones



On 4/5/13 7:23 AM, Matijn Woudt wrote:

On Fri, Apr 5, 2013 at 3:19 PM, Toby Hart Dyke t...@hartdyke.com wrote:



It looks similar to this bug: 
http://bugs.php.net/bug.php?**id=54379http://bugs.php.net/bug.php?id=54379- 
possibly fixed in a later version? Your PHP is pretty elderly.

   Toby




I would suggest to upgrade the full system.
LC_* shows the OS is using ISO-8859-1, which is extremely outdated.  It
should use UTF-8 of course, or at least the ISO-8859-15.
The database uses ISO-8859-15, and then you output it to the browser
(without converting it I assume), and you tell the browser it is UTF-8 data?

About your problem, it seems Toby is right about the bug report. It seems
it has not been fixed yet, there is a patch but devs didn't find I good
enough it. You might want to look at the options to use an ISO-8859-15
connection instead of UTF-8 while the bug has not been fixed.

- Matijn



A PHP upgrade will fix various things in PDO and a few things in PDO_OCI.
I don't know if your current issue is one of them.

OCI8 is the preferred driver for Oracle DB access.  It is maintained and
has performance features that PDO_OCI doesn't have: connection pooling,
statement caching etc.

The bigger issue is there aren't any PDO_OCI developers.  Also no one
is overseeing the PDO project (all drivers) so it is decaying and
fragmenting.  (Volunteers to assist are welcome).  Even the MySQL team
would recommend mysqli instead of PDO_MYSQL.

Chris

--
christopher.jo...@oracle.com  http://twitter.com/ghrd
Newly updated, free PHP  Oracle book:
http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php