#32360 [Fbk->NoF]: Unicode support

From: Date: Fri, 25 Mar 2005 00:53:04 +0000
Subject: #32360 [Fbk->NoF]: Unicode support
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76884@lists.php.net to get a copy of this message
 ID:               32360
 Updated by:       sniper@php.net
 Reported By:      vogje01 at ca dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Ingres II related
 Operating System: Win2k3
 PHP Version:      5CVS-2005-03-18 (dev)
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




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

[2005-03-19 00:37:15] sniper@php.net

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


------------------------------------------------------------------------

[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


Thread (3 messages)

« previous php.bugs (#76884) next »