php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32360 Unicode support
Submitted: 2005-03-18 09:08 UTC Modified: 2005-03-25 01:53 UTC
From: vogje01 at ca dot com Assigned:
Status: No Feedback Package: Ingres II related
PHP Version: 5CVS-2005-03-18 (dev) OS: Win2k3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-03-18 09:08 UTC] 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...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-19 00:37 UTC] sniper@php.net
Please provide the patch in unified diff format and put it online somewhere where we can download it. 

 [2005-03-25 01:53 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Feb 20 08:01:24 2020 UTC