[OPEN-ILS-GENERAL] Language problems in Evergreen

Dan Scott dan at coffeecode.net
Fri Mar 11 11:53:15 EST 2011


On 10 March 2011 10:48, Dan Scott <dan at coffeecode.net> wrote:
> On 10 March 2011 02:36, Tigran Zargaryan <tigran at flib.sci.am> wrote:
>> Hi Dan,
>> reporting about the current situation with patron registration and search
>> using non-Latin scripts..
>> After installing OpenSrf 2.0 and EG 2.0 we are able to register and save
>> patrons in Armenian.
>> But when searching the patrons by name or last name (e.g. using Armenian
>> script) the system is replying 'No patrons found matching search criteria'.
>> Same search by  patron bar code is giving a positive result.
>> So now we can save the patrons, but retrieval by non-Latin script is
>> resulting to null.

A further update on this: when I built a Debian Squeeze image using
Evergreen 2.0.3 and OpenSRF 2.0.0-rc2, I was able to reproduce your
problem.

We traced the specific problem in this instance down to the Unicode
data not being properly encoded in the Perl module before being sent
to the database. Using the Encode Perl module and its encode_utf8()
method to properly encode the incoming arguments resolved the problem.
So that fix will go into 2.0.4 - or, if you want to apply it to your
local server now (and I wouldn't blame you!), you can grab the latest
version of Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
from SVN and copy it to
/openils/lib/perl5/OpenILS/Application/Storage/Publisher/actor.pm,
then restart the open-ils.storage service and all should suddenly
start working for you.

Note for self in the future: encode_utf8() (normally paired with
decode_utf8()) is your friend!

Note that my inability to reproduce this problem on Fedora suggests
that Fedora might be doing some automatic encoding of the data that
the Debian-based distributions don't do. Interesting...


More information about the Open-ils-general mailing list