Bug #74212 [NEW]: Prepare destroys some UTF-8 characters on Insert

From: Date: Mon, 06 Mar 2017 16:25:18 +0000
Subject: Bug #74212 [NEW]: Prepare destroys some UTF-8 characters on Insert
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207706@lists.php.net to get a copy of this message
From:             michael dot kaiser at winzeldorf dot de
Operating system: Linux
PHP version:      5.6.30
Package:          PDO MySQL
Bug Type:         Bug
Bug description:Prepare destroys some UTF-8 characters on Insert

Description:
------------
It is not possible to insert turkish UTF8 characters (like in the name
Elit İşcan) into a MySQL database via PDO.
I tried MyISAM tables and InnoDB tables.
I tried utf8, utf16, utf32, utfmb4 and ISO 8859-9 Turkish (latin 5)

Test script:
---------------
// Does not work:
$query = "INSERT INTO utf8test (Name) VALUES ("Elit İşcan")";
$pdo = $db->prepare($query);
$pdo->execute();
// Results in entry "Elit ??can".



Expected result:
----------------
Database entry should read "Elit İşcan"

Actual result:
--------------
Database entry is "Elit ??can"

Old MySQL command works:
$query = "INSERT INTO utf8test (Name) VALUES ("Elit İşcan")";
mysql_query(query);
Results in entry "Elit İşcan".

-- 
Edit bug report at https://bugs.php.net/bug.php?id=74212&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74212&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74212&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74212&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74212&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74212&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74212&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74212&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74212&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74212&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74212&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74212&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74212&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74212&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74212&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74212&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74212&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74212&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74212&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74212&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74212&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#207706) next »