[OPEN-ILS-GENERAL] Unicode in patron's names

Dan Scott dan at coffeecode.net
Wed Nov 24 11:25:13 EST 2010


On Wed, Nov 24, 2010 at 03:37:58PM +0400, Dimitri Gogelia wrote:
> Hi everyone!
> 
> I need to enter into the system the names of users in the Georgian, but the
> system is kind of a mistake and does not allow the search on Georgian.
> 
> How can I fix it?

Hi Dimitri:

There is a regular expression in the Patron Editor interface that tries
to validate names to prevent numbers, spaces, tabs, etc from getting in.
Unfortunately, old versions (you're running 1.4.something if I recall
correctly) use the [a-zA-Z] character class, which is obviously not
Unicode-aware.

Newer versions of that interface allow the use of Unicode characters
in patron names. The regular expression was changed from:

const nonumRegex        = /^[a-zA-Z]\D*$/; /* no numbers, no beginning whitespace */

to:

const nonumRegex    = /^[^\d\s]\D*$/; /* no numbers, no beginning whitespace */

See
http://svn.open-ils.org/trac/ILS/browser/branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron/ue_config.js#L35
for the location of the regular expression; you can change it locally at
/openils/var/web/xul/server/patron/ue_config.js until you move to a
newer version of Evergreen.

Dan


More information about the Open-ils-general mailing list