ID:               32360
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vogje01 at ca dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Ingres II related
 Operating System: Win2k3
 PHP Version:      5CVS-2005-03-18 (dev)
 New Comment:

Please provide the patch in unified diff format and put it online
somewhere where we can download it. 



Previous Comments:
------------------------------------------------------------------------

[2005-03-18 09:08:51] vogje01 at ca dot com

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 this bug report at http://bugs.php.net/?id=32360&edit=1

Reply via email to