May 012016

This weekend, I posted a new MarcEdit update.  This is one of the biggest changes that I’ve made in a while.  While the actual changelog is brief – these changes represented ~17k lines of code Windows (~10K not related to UI work) and ~15.5k lines of code on the OSX side (~9K not related to UI work).

Specific changes added to MarcEdit:


  • Enhancement: UNIMARC Tools: Provides a lite-weight tool to convert data to MARC21 from UNIMARC and to UNIMARC from MARC21.
  • Enhancement: Replace Function: Option to support External search/replace criteria.
  • Enhancement: MARCEngine COM Object Updates


  • Enhancement: UNIMARC Tools: Provides a lite-weight tool to convert data to MARC21 from UNIMARC and to UNIMARC from MARC21.
  • Enhancement: Replace Function: Option to support External search/replace criteria.
  • Update: Installation has been changed to better support keeping configuration information sync’d between updates.
  • Bug Fix: Add/Delete Function — Add field if not a duplicate:  Option wasn’t always working.  This has been corrected.

I’m created some videos to demonstrate how these two elements work, and then a third video showing how to use the Add Field if not a duplicate (added in the previous update).  You can find these videos here:

Add Field If Not a Duplicate

MarcEdit’s UNIMARC Tools:

MarcEdit: Batch Replacement using External Criteria

You can get the changes from the downloads page or through MarcEdit’s automated update tool.


 Posted by at 8:10 pm

MarcEdit Mac: Export Tab Delimited Records

 MarcEdit  Comments Off on MarcEdit Mac: Export Tab Delimited Records
Mar 282016

As part of the last update, I added a new feature that is only available in the Mac Version of MarcEdit at this point.  One of the things that had been missing in the Export Tab Delimited Tool was the ability to save and load one’s export settings.  I added that as part of the most recent update.  At the same time, I though that the ability to batch process multiple files using same criteria may be useful as well.  So this has been added to the Mac interface as well.

Screen Shot 2016-03-29 at 12.14.29 AM

In the image above, you initiate the batch processing mode by checking the batch process checkbox.  This will change the marc file and save file textbox and buttons to directory paths.  You will also be prompted to select a file extension to process.

I’m not sure if this will be useful — but as I’m working through new functionality, I’ll be noting changes being made to the MarcEdit Mac version.  And this is notable, because this is the first time that the Mac version contains functionality that is not in the Windows version.


 Posted by at 9:15 pm

MarcEdit Bug Fix Update

 MarcEdit  Comments Off on MarcEdit Bug Fix Update
Mar 282016

I’ve posted a new update for all versions of MarcEdit this afternoon.  Last night, when I posted the new update, I introduced a bug into the RDA Helper that rendered it basically unusable.  When adding functionality to the tool to enable support for abbreviations at a subfield level, I introduced a problem that removed the subfield codes from fields where abbreviations would take place.

So what does this bug look like?  When processing data, a set field that would look like this:
=300  \\$a1 vol $b ill.

would be replaced to look like:
=300  \\a1 volume b illustrations

As one case see, the delimiter symbol “$” has been removed.  This occurred in all fields where data abbreviations were occurring.  This has been corrected with this update.

You can get the update from the downloads page: or via the automated update tool.


 Posted by at 9:05 pm

MarcEdit Updates

 MarcEdit  Comments Off on MarcEdit Updates
Mar 272016

I spent some time this week working through a few updates based on some feedback I’ve gotten over the past couple of weeks.  Most of the updates at this point are focused on the Windows/Linux builds, but the Mac build has been updated as well as all new functionality found in the linking libraries and RDA changes apply there as well.  I’ll be spending this week focusing on making Mac MarcEdit UI to continue to work towards functional parity with the Windows version.

Windows/Linux Updates:

* 6.2.100
** Bug Fix: Build Links Tool — when processing a FAST heading without a control number, the search would fail.  This has been corrected.
** Bug Fix: MarcEditor — when using the convenience function that allows you to open mrc files directly into the MarcEditor and saving directly back to the mrc file — when using a task, this function would be disconnected.  This has been corrected.
** Enhancement: ILS Integration — added code to enable the use of profiles.
** Enhancement: ILS Integration — added a new select option so users can select from existing Z39.50 servers.
** Enhancement: OAI Harvesting — Added a debug URL string so that users can see the URL MarcEdit will be using to query the users server.
** UI Change: OAI Harvesting — UI has been changed to have the data always expanded.
** Enhancement: MarcValidator — Rules file has been updated to include some missing fields.
** Enhancement; MarcValidator — Rules file includes a new parameter: subfield, which defines the valid subfields within a field.  If a subfield appears not in this list, it will mark the record as an error.
** Enhancement: Task Menu — Task menu items have been truncated according to Windows convention.  I’ve expanded those values so users can see approximately 45 characters of a task name.
** Cleanup: Validate Headings — did a little work on the validate headings to clean up some old code.  Finishing prep to start allowing indexes beyond LCSH based on the rules file developed for the build links tool.


Mac Updates:

** 1.4.43 ChangeLog
* Bug Fix: Build Link Tool: Generating FAST Headings would work when an identifier was in the record, but wasn’t correctly finding the data when looking.
* Enhancement: RDA Helper:  Rules file has been updated and code now exists to allow users to define subfields that are valid.
* Bug Fix: RDA Helper: Updated library to correct a processing error when handling unicode replacement of characters in the 264.
* Enhancement: RDA Helper: Users can now define fields by subfield.  I.E. =245$c and abbreviation expansion will only occur over the defined subfields.

MarcValidator Changes:

One of the significant changes in the program this time around has been a change in how the Validator works.  The Validator currently looks at data present, and determines if that data has been used correctly.  I’ve added a new field in the validator rules file called subfield (Example block):

# Uncomment these lines and add validation routines like:
#valida    [^0-9x]    Valid Characters
#validz    [^0-9x]    Valid Characters
ind1    blank    Undefined
ind2    blank    Undefined
subfield    acqz68    Valid Subfields
a    NR    International Standard Book Number
c    NR    Terms of availability
q    R    Qualifier
z    R    Canceled/invalid ISBN
6    NR    Linkage
8    R    Field link and sequence number

The new block is the subfield item – here the tool defines all the subfields that are valid for this field.  If this element is defined and a subfield shows up that isn’t defined, you will receive an error message letting you know that the record has a field with an improper subfield in it.

RDA Helper

The other big change came in the RDA Helper.  Here I added the ability for the abbreviation field to be defined at a finer granularity.  Up to this point, abbreviation definitions happened at the field or field group level.  Users can now define down to the subfield level.  For example, if the user wanted to just target the 245$c, for abbreviations but leave all other 245 subfields alone, one would just define =245$c in the abbreviation field definition file.  If you want to define multiple subfields for processing, define each as its own unit…i.e:

You can get the download from the MarcEdit website ( or via the MarcEdit automatic download functionality.

Questions, let me know.


 Posted by at 10:24 pm

MarcEdit Update

 MarcEdit  Comments Off on MarcEdit Update
Mar 142016

I posted a small MarcEdit Update for Linux/Windows users that corrects some file path issues on linux and corrects a problem introduced in doing unicode character replacement in the 260/264 process of the RDA Helper.  You can get the update from the downloads page or via the automated updates.

I also wanted to take this as a time to make a quick reminder to something because it was something that came up during my testing.  I test on a wide range of VMs when I push an update.  This doesn’t mean that I catch everything, but it means that I do endeavor to try and minimize the problems that can occur due to the Windows Installer (and there are many).  On one of my Windows 10 VMS, and update that touched the .NET framework somehow invalidated the MarcEdit install.  When this happens, you have a couple options.  The one I recommend —

1) Uninstall MarcEdit completely.  This includes going to the Program Directory and Deleting the MarcEdit program directory.  The Windows Installer does various types of black magic, and the only way to make sure that this goes away is to get rid of the directory.

2) if you cannot uninstall the program (said Windows Installer black magic has gone haywire) – there is a program called the msicleaner on the MarcEdit downloads page.  Download that, run it as an administrator – and then go to the Program Directory and delete the MarcEdit program directory.  Then reinstall.  Again, the msi installer with unstuck the Windows Installer – but removing the contents of the directory will prevent future black magic chicanery. 

Again – this showed up on 1 on the 12 or 15 VMs I test on – but since it showed up after an update, its hard to know if this is something that will affect others.  Given that – I thought this would be a good time to remind users of how to overcome issues with the Windows Installer when/if they occur.



 Posted by at 2:03 am
Mar 032016

Yesterday, I had someone indicate that there was a problem with the Add/Delete Field function.  An update in the last version to allow for deduplication deletions based on subfields tripped other deletions.  This was definitely problematic.  This has been corrected, in addition to a couple other changes.

Change log:


  • Bug Fix: Add/Delete Field: I introduced an element into the Delete function to allow dedup deletions to happen at the subfield level. This tripped non-dedup deletions. This has been corrected.
  • Update: Build New Links: FAST headings in the 600,611,630 weren’t being processed. I’ve updated the rules file appropriately.
  • Update: RDA Helper Abbrevs File: Add S.L. abbreviation.
  • Bug Fix: Validate Headings: The Check A only when subject checking wasn’t honoring that option. This is corrected.

Changes can be found on the downloads page:



 Posted by at 11:01 pm

MarcEdit Update

 MarcEdit  Comments Off on MarcEdit Update
Feb 282016

Update was posted Feb. 27 to all versions.  Update Contains the following changes:


  • Enhancement: Characterset Detection: MarcEdit is including a tool that will provide a heuristical analysis of a file to provide best guess characterset detection. (
  • Enhancement: Build New Tool Function: Adding a find macro to the function so that users can now identify specific fields when building new fields from data in a MARC record. (
  • Update: Build Links — improved handling of MESH data ** Update: Build Links — improved handling of AAT data
  • Update: Build Links — improved handling of ULAN data
  • Update: Build Links — added work around to character escaping issues found in .NET 4.0. Issue impacts URIs with trailing periods and slashes (/). Apparently, the URI encoding tool doesn’t escape them properly because of how Windows handles file paths.
  • Update: Build Links — Rules file updated to include refined definitions for the 6xx fields.
  • Update: MarcEdit Command-Line: program updated to include new build links functional updates
  • Update: COM object: Updated character encoding switching to simplify streaming functions.
  • Update: Validate Headings: Integrated rules file into checking.
  • Bug Fix: Validate Headings: headings validation was being tripped by the URI escaping issue in .NET 4.0. This has been corrected.
  • Update: RDA Helper: Finished code refinements
  • Update: Build Links — tool is now asynchronous
  • Enhancement: Build Links — Users can now select and build their own rules files
  • Enhancement: Build Links — Tool now includes a function that will track resolution speed from linked services and attempt to provide notification when services are performing poorly. First version won’t identify particular services — just that data isn’t being processed in a timely manner.
  • Bug Fix: Character Conversion — UTF-8 to MARC-8, the {dollar} literal isn’t being converted back to a literal dollar sign. This is related to removing the fall back entity checking in the last update. This has been corrected.

Updates can be picked up through the automated update tools in MarcEdit or via the downloads page:



 Posted by at 6:49 am

MarcEdit: Build New Field Enhancement

 MarcEdit  Comments Off on MarcEdit: Build New Field Enhancement
Feb 232016

I’m wrapping up a few odds and ends prior to releasing the next MarcEdit update – mostly around the linked data work and how the tool works with specific linked data services – but one of the specific changes that should make folks using the Build New Field tool happy is the addition of a new macro that can be used to select specific data elements when building a new field. 

So, for those that might not be aware, the build new field tool is a pattern based tool that allows users to select information from various MARC fields in a record and create a new field.  You can read about the initial description at: and the enhancements that added a kind of macro language to the tool here:

When the tool runs, one of the assumptions that is made is that the tool pulls the data for the pattern from the first field/field/subfield combination that meets the pattern criteria.  This works well if your record has only a single field for the data that you need to capture.  But what if you have multiple fields.  Say for example, the user needs to create a call number, and one of those elements will be the ISBN – however, the record has multiple ISBN fields like:
=020  \\$a123456 (ebook)
=020  \\$a654321 (hardcopy)

Say I need to specifically get the ISBN from the hardcopy.  In the current build new tool function, this wouldn’t be possible without first changing the first 020 to something else (like an 021) – then changing it back when the operation was completed.  This is because if I used say:
=099  \\$aMyCall Number {020$a}

I would get the first 020$a value.  There hasn’t been a way to ask for the tool to find specific field data in this function.  But that has changed – I’ve introduced: find. 

Function: .find
Arguments: needle
Example: {020$a.find(“hardcopy”)}

Find will allow you to selectively find data in a field.  So, in the example above, I can now select the correct 020.
=020  \\$aMyCall Number {020$a.find(“hardcopy”).replace(“(hardcopy)”,””)}

This will output:
=020  \\$aMyCall Number 654321

A couple notes about usage.  Find must always be the first option in a chain of macros.  This is because the tool actually does the other operations like substitutions – so the criteria being queried must reflect the data in the record at read – not after it has been processed.  If you place find in any other position, you may invalidate your pattern. 

This will be part of the next upcoming MarcEdit update.


 Posted by at 8:20 am
Feb 142016

The topic of charactersets is likely something most North American catalogers rarely give a second thought to.  Our tools, systems – they all are built around a very anglo-centric world-view that assumes data is primarily structured in MARC21, and recorded in either MARC-8 or UTF8.  However, when you get outside of North America, the question of characterset, and even MARC flavor for that matter, becomes much more relevant.  While many programmers and catalogers that work with library data would like to believe that most data follows a fairly regular set of common rules and encodings – the reality is that it doesn’t.  While MARC21 is the primary MARC encoding for North American and many European libraries – it is just one of around 40+ different flavors of MARC, and while MARC-8 and UTF-8 are the predominate charactersets in libraries coding in MARC21, move outside of North American and OCLC, and you will run into Big5, Cyrillic (codepage 1251), Central European (codepage 1250), ISO-5426, Arabic (codepage 1256), and a range of many other localized codepages in use today.  So while UTF-8 and MARC-8 are the predominate encodings in countries using MARC21, a large portion of the international metadata community still relies on localized codepages when encoding their library metadata.  And this can be a problem for any North American library looking to utilize metadata encoded in one of these local codepages, or share data with a library utilizing one of these local codepages.

For years, MarcEdit has included a number of tools for handling this soup of character encodings – tools that work at different levels to allow the tool to handle data from across the spectrum of different metadata rules, encodings, and markups.  These get broken into two different types of processing algorithms.

Characterset Identification:

This algorithm is internal to MarcEdit and vital to how the tool handles data at a byte level.  When working with file streams for rendering, the tool needs to decide if the data is in UTF-8 or something else (for mnemonic processing) – otherwise, data won’t render correctly in the graphical interface without first determining characterset for use when rendering.  For a long time (and honestly, this is still true today), the byte in the LDR of a MARC21 record that indicates if a record is encoded in UTF-8 or something else, simply hasn’t been reliable.  It’s getting better, but a good number of systems and tools simply forget (or ignore) this value.  But more important for MarcEdit, this value is only useful for MARC21.  This encoding byte is set in a different field/position within each different flavor of MARC.  In order for MarcEdit to be able to handle this correctly, a small, fast algorithm needed to be created that could reliably identify UTF8 data at the binary level.  And that’s what’s used – a heuristical algorthm that reads bytes to determine if the characterset might be in UTF-8 or something else.

Might be?  Sadly, yes.  There is no way to auto detect characterset.  It just can’t happen.  Each codepage reuses the same codepoints, they just assign different characters to those codepoints based on which encoding is in use. So, a tool won’t know how to display textual data without first knowing the set of codepointer rules that data was encoded under.  It’s a real pain the backside.

To solve this problem, MarcEdit uses the following code in an identification function:

          int x = 0;
            int lLen = 0;

                x = 0;
                while (x < p.Length)
                    if (p[x] <= 0x7F)
                    else if ((p[x] & 0xE0) == 0xC0)
                        lLen = 2;
                    else if ((p[x] & 0xF0) == 0xE0)
                        lLen = 3;
                    else if ((p[x] & 0xF8) == 0xF0)
                        lLen = 4;
                    else if ((p[x] & 0xFC) == 0xF8)
                        lLen = 5;
                    else if ((p[x] & 0xFE) == 0xFC)
                        lLen = 6;
                        return RET_VAL_ANSI;
                    while (lLen > 1)
                        if (x > p.Length || (p[x] & 0xC0) != 0x80)
                            return RET_VAL_ERR;
                    iEType = RET_VAL_UTF_8;
            catch (System.Exception kk) {
                iEType= RET_VAL_ERROR

            return iEType;

This function allows the tool to quickly evaluate any data at a byte level and identify if that data might be UTF-8 or not.  Which is really handy for my usage.

Character Conversion

MarcEdit has also included a tool that allows users to convert data from one character encoding to another.


This tool requires users to identify the original characterset encoding for the file to be converted.  Without that information, MarcEdit would have no idea which set of rules to apply when shifting the data around based on how characters have been assigned to their various codepoints.  Unfortunately, a common problem that I hear from librarians, especially librarians in the United States that don’t have to deal with regularly this problem, is that they don’t know the file’s original characterset encoding, or how to find it.  It’s a common problem – especially when retrieving data from some Eastern European publishers and Asian publishers.  In many of these cases, users send me files, and based on my experience looking at different encodings, I can make a couple educated guesses and generally figure out how the data might be encoded.

Automatic Character Detection

Obviously, it would be nice if MarcEdit could provide some kind of automatic characterset detection.  The problem is that this is a process that is always fraught with errors.  Since there is no way to definitively determine the characterset of a file or data simply by looking at the binary data – we are left having to guess.  And this is where heuristics comes in again.

Current generation web browsers automatically set character encodings when rendering pages.  This is something that they do based on the presence of metadata in the header, information from the server, and a heuristic analysis of the data prior to rendering.  This is why everyone has seen pages that the browser believes is one character set, but is actually in another, making the data unreadable when it renders.  However, the process that browsers are currently using, well, as sad as this may be, it’s the best we got currently.

And so, I’m going to be pulling this functionality into MarcEdit.  Mozilla has made the algorithm that they use public, and some folks have ported that code into C#.  The library can be found on git hub here:  I’ve tested it – it works pretty well, though is not even close to perfect.  Unfortunately, this type of process works best when you have lots of data to evaluate – but most MARC records are just a few thousand bytes, which just isn’t enough data for a proper analysis.  However, it does provide something — and maybe that something will provide a way for users working with data in an unknown character encodings to actually figure out how their data might be encoded.

The new character detection tools will be added to the next official update of MarcEdit (all versions).


And as I noted – this is a tool that will be added to give users one more tool to evaluating their records.  While detection may still only be a best guess – its likely a pretty good guess.

The MARC8 problem

Of course, not all is candy and unicorns.  MARC8, the lingua franca for a wide range of ILS systems and libraries – well, it complicates things.  Unlike many of the localized codepages that are actually well defined standards and in use by a wide range of users and communities around the world – MARC-8 is not.  MARC8 is essentially a made up encoding – it simply doesn’t exist outside of the small world of MARC21 libraries.  To a heuristical parser evaluating character encoding, MARC-8 looks like one of four different characterset: USASCII, Codepage 1252, ISO-8899, and UTF8.  The problem is that MARC-8, as an escape-base language, reuses parts of a couple different encodings.  This really complicates the identification of MARC-8, especially in a world where other encodings may (probably) will be present.  To that end, I’ve had to add a secondary set of heuristics that will evaluate data after detection so that if the data is identified as one of these four types, some additional evaluation is done looking specifically for MARC-8’s fingerprints.  This allows, most of the time, for MARC8 data to be correctly identified, but again, not always.  It just looks too much like other standard character encodings.  Again, it’s a good reminder that this tool is just a best guess at the characterset encoding of a set of records – not a definitive answer.

Honestly, I know a lot of people would like to see MARC as a data structure retired.  They write about it, talk about it, hope that BibFrame might actually do it.  I get their point – MARC as a structure isn’t well suited for the way we process metadata today.  Most programmers simply don’t work with formats like MARC, and fewer tools exist that make MARC easy to work with.  Likewise, most evolving metadata models recognize that metadata lives within a larger context, and are taking advantage of semantic linking to encourage the linking of knowledge across communities.  These are things libraries would like in their metadata models as well, and libraries will get there, though I think in baby steps.  When you consider the train-wreck RDA adoption and development was for what we got out of it (at a practical level) – making a radical move like BibFrame will require a radical change (and maybe event that causes that change).

But I think that there is a bigger problem that needs more immediate action.  The continued reliance on MARC8 actually posses a bigger threat to the long-term health of library metadata.  MARC, as a structure, is easy to parse.  MARC8, as a character encoding, is essentially a virus, one that we are continuing to let corrupt our data and lock it away from future generations.  The sooner we can toss this encoding to the trash heap, the better it will be for everyone – especially since we are likely the passing of one generation away from losing the knowledge of how this made up character encoding actually works.  And when that happens, it won’t matter how the record data is structured – because we won’t be able to read it anyway.


 Posted by at 3:48 pm
Feb 062016

Would this be the super bowl edition? Super-duper update? I don’t know – but I am planning an update. Here’s what I’m hoping to accomplish for this update (2/7/2016):

MarcEdit (Windows/Linux)

· Z39.50/SRU Enhancement: Enable user defined profiles and schemas within the SRU configuration. Status: Complete

· Z39.50/SRU Enhancement: Allow SRU searches to be completed as part of the batch tool. Status: ToDo

· Build Links: Updating rules file and updating components to remove the last hardcode elements. Status: Complete

· MarcValidators: Updating rules file Status: Complete

· RDA Bug Fix: 260 conversion – rare occasions when {} are present, you may lose a character Status: Complete

· RDA Enhancement: 260 conversion – cleaned up the code Status: Complete

· Jump List Enhancement: Selections in the jump list remain highlighted Status: Complete

· Script Wizard Bug Fix: Corrected error in the generator that was adding an extra “=” when using the conditional arguments. Status: Complete

MarcEdit Linux

· MarcEdit expects the /home/[username] to be present…when it’s not, the application data is being lost causing problems with the program. Updating this so allow the program to drop back to the application directory/shadow directory. Status: Testing

MarcEdit OSX

· RDA Fix [crash error when encountering invalid data] Status: Testing

· Z39.50 Bug: Raw Queries failing Status: Complete

· Command-line MarcEdit: Porting the Command line version of marcedit (cmarcedit). Status: Testing

· Installer – Installer needs to be changed to allow individual installation of the GUI MarcEdit and the Command-line version of MarcEdit. These two version share the same configuration data Status: ToDo


 Posted by at 5:09 am