[OPEN-ILS-DEV] ***SPAM*** question about metabib.rec_descriptor.char_encoding

Dan Scott dan at coffeecode.net
Thu Sep 9 10:57:53 EDT 2010


On Thu, 2010-09-09 at 10:37 -0400, Joe Atzberger wrote:
> Many systems, including common proprietary and open source platforms
> failed
> to flip that indicator when encoding the record for import.  There is
> no
> great way to resolve this problem except by fixing the data or
> preprocessing
> it.  I'm sure other Evergreen users have encountered this problem, so
> there
> may already be a script to help diagnose or fix.

Given that every record in Evergreen has to be in Unicode, once the
records are already in the system the easiest fix would be:

UPDATE biblio.record_entry
    SET marc = regexp_replace(marc, E'(<leader>.{9}).', E'\\1a');

You'll get lots of updates to records that don't need the update, so you
might want to add a WHERE clause, but that will set the leader
appropriately for you (assuming that there are no namespaces set on the
<leader> element, etc).



More information about the Open-ils-dev mailing list