Resolve inconsistent results when invoking LOWER() in C vs. UTF8 locale databases
As reported by the Fundamental Science Library of Armenia, patron searches
were not retrieving patrons who were known to be part of the patron database.
While the initial approach to solve this problem used an encode_utf8() call
to encode the data before passing it on to the database, this turned out to
break the patron search function in other environments.
Testing by Dan Wells confirmed that the LOWER() function returned different
results when invoked against text in a database created with LC_CTYPE=C vs
a database created with LC_CTYPE=*.UTF-8. As the patron search function
used a Perl lc() function call to convert the incoming data to lowercase,
the success of the call depended on the LC_CTYPE value of the database.
To avoid this problem in the future, we define our own evergreen.lowercase()
function that can reliably produce lowercase text for characters outside
the Latin1 range, and we convert our indexes and function calls to use that
function consistently.
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@19716
dcc99617-32d9-48b4-a31d-
7c20da2025e4