Download & Extend

Wrong comparison of accented characters in strings

Project:Unique field
Version:6.x-1.4
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:needs work

Issue Summary

I use this module in a simple Drupal setup to ensure the uniqueness of node titles.
There are two problems, however.

The problem depends on the string types in the MySQL tables. See case sensitivity in string searches.
I assume that certain setups are not affected because they create database tables with binary strings.

I think the module should ensure that strings are compared using BINARY string representations.
See the BINARY Operator.

The solution is simple: $qwhere = "BINARY node.title = '". db_escape_string($values) ."' ";

I think other text fields should also be treated this way.

nobody click here