From:             vogje01 at ca dot com
Operating system: Win2k3
PHP version:      5CVS-2005-03-18 (dev)
PHP Bug Type:     Ingres II related
Bug description:  Unicode support

Description:
------------
Hi,
I tried to compile php5-200503170530 with ingres support on Win2k3 using
VC7 (.net). I found out that unicode (nchar and nvarchar are not
supported.

The following lines should be added to ext\ingres_ii\ii.c

1287,1293c1287
< #ifdef WIN32  
<                                                       case IIAPI_NVCH_TYPE:   
/* variable length unicode character string
*/
<                                                       case IIAPI_NCHA_TYPE:   
/* variable length unicode character string
*/
<                                                               len = 
wcslen((columnData[k - 1]).dv_value)*sizeof( WCHAR);
<                                                               
IIAPI_CONVERT(IIAPI_CHA_TYPE, len, 0);
<                                                               /* NO break */
< #endif
---
>       
Could you please add the new lines? Currently I only tested win32. I will
also test on Linux and Solaris.

Best regards
Dr. Jens Vogt


Reproduce code:
---------------
$intext = "This is a unicode test: öäüèàé";
$db = ingres_connect('iidbdb', $user, $passwd);

$query = "create table temp ( name nvarchar(50) )";
ingres_query( $query, $db );

$query = "insert into temp (name) values('{$intext}')";
ingres_query( $query, $db );

$query = "select name from temp";
ingres_query( $query, $db );

$row = ingres_fetch_row( $db );
$outtext = trim($row[1]);

$query = "drop table temp";
ingres_query( $query, $db );

echo "Outext: {$outtext}\n";

Expected result:
----------------
This is a unicode test: öäüèàé

Actual result:
--------------
Garbage...

-- 
Edit bug report at http://bugs.php.net/?id=32360&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32360&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32360&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32360&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32360&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32360&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32360&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32360&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32360&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32360&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32360&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32360&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32360&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32360&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32360&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32360&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32360&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32360&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32360&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32360&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32360&r=mysqlcfg

Reply via email to