#32360 [Opn->Fbk]: Unicode support

From: Date: Fri, 18 Mar 2005 23:37:16 +0000
Subject: #32360 [Opn->Fbk]: Unicode support
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76852@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: 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

« previous php.bugs (#76852) next »