Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003203 [Quercus] minor always 12-29-08 12:15 01-03-09 13:43
Reporter nam View Status public  
Assigned To ferg
Priority high Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003203: SET NAMES 'utf-8', VARCHAR string truncation
Description (rep by M. Schmidt)

<?php

$db = mysql_connect();
mysql_query("CREATE DATABASE test");
mysql_select_db("test");

mysql_query("DROP TABLE test");
mysql_query("CREATE TABLE test (a VARCHAR(10), b BLOB(10))");
mysql_query("SET NAMES 'utf8'");

mysql_query("INSERT INTO test VALUES ('\xC2\xA2', '\xC2\xA2')");
$result = mysql_query("SELECT * FROM test");

$array = mysql_fetch_assoc($result);
var_dump(bin2hex($array["a"]));
var_dump(bin2hex($array["b"]));

?>

results:
string(2) "a2"
string(4) "c2a2"

expected results:
string(4) "c2a2"
string(4) "c2a2"
Additional Information
Attached Files

- Relationships

- Notes
(0003689)
ferg
01-03-09 13:43

php/1468
 

- Issue History
Date Modified Username Field Change
12-29-08 12:15 nam New Issue
01-03-09 13:43 ferg Note Added: 0003689
01-03-09 13:43 ferg Assigned To  => ferg
01-03-09 13:43 ferg Status new => closed
01-03-09 13:43 ferg Resolution open => fixed
01-03-09 13:43 ferg Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker