Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #18531 Multibyte characters not handled in prepare
Submitted: 2011-05-12 21:40 UTC
From: sdanzig Assigned:
Status: Open Package: MDB2_Driver_mysqli (version 1.4.1)
PHP Version: 5.3.0 OS: Windows XP SP 3
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 8 - 4 = ?

 
 [2011-05-12 21:40 UTC] sdanzig (Scott Danzig)
Description: ------------ When preparing a query with foreign characters, prepare fails. The prepare statement uses strpos to find the position of placeholders (in my case, question marks)..then uses simple array indexing to try to access this character. However, the memory representation is different from the string representation in the instance where some multibyte characters are used. I fixed this using mb_substr() in the 3 places where array indexing on the query is used in prepare().

Comments