What is a Character Set? (Part Three): UNICODE: the future is now!

If you thought it would be strange that computers would still rely on 40-year-old technology to deal with the world’s many writing systems, you would be correct. While the library world was content to stick with MARC-8, the computing world evolved constantly.

For most computer users in the early days of MARC-8, having access to many code points was not especially important. Libraries, as multilingual environments, were one of the few institutions where the availability of multiple scripts was important.

By the late 80’s, however, the rapid adoption of the Internet and the World Wide Web meant that computers around the world could talk to each other. At the same time, computing power was growing rapidly. The phones that we carry in our pockets have greater computing power than NASA used to put humans in space, so processing lots and lots of bits is no longer a problem.

Having a huge number of encodings schemes was counter-productive, as communication in one locale would be rendered as gibberish in another. (Does anyone remember this from the early days of the Internet? Running through encoding settings in order to make a website readable?)

To solve this, computer scientists began working toward a universal standard that could unite all existing standards, and all of the scripts and characters they expressed, into one single standard. The result was Unicode, which was incorporated in 1991 after discussions between engineers at Xerox and Apple.

Unicode is a bit confusing from an encoding standpoint, as it is not an encoding, per se, but rather a standard. Unicode can be implemented in several ways, but the most common (and current) are UTF-8, UTF-16, and UTF-32. UTF-32 and-16 are fixed bit schema, which means that each character takes up exactly 32 or 16 bits. UTF-16 is the rarest of these three and is seen as unstable due its lack of use. UTF-32 takes up the most space, and is therefore not very common either. UTF-8 is a variable bit scheme, with characters taking up 8, 16, 24 or 32 bits. This flexibility means that all characters can be expressed easily, yet less space is taken up than UTF-32.

Other encodings have been implemented or proposed, yet none are very common. UTF-8 is the web standard, although any other UTF encoding should present little difficulty to browsers or other document readers.

Now that we’ve covered encodings, let’s cover what Unicode is. Unicode, as I’ve mentioned is a standard. And it is governed by the Unicode Consortium. This consortium is made up of members, mostly tech companies like Apple and Adobe and Oracle, but also many governments, linguistics institutions, universities, and even interested individuals. These members collaborate to ensure that Unicode truly works as a (near) universal standard, to ensure that every computer can produce and interpret Unicode-compliant material, and expand the standard to include the scripts necessary to digitally (re)produce the sum of human knowledge.

As a standard, Unicode assigns hexadecimal code points to characters, which are represented in slightly different ways depending upon the encoding selected. These characters and conceived of as belonging to blocks. The capital letter <Q> belongs to the C0 Controls and Basic Latin block and has the specific code U+0051. (0051 is the code point, “U+” is usually added to specify that we’re talking about Unicode.)

As the need for more scripts or symbols grows, Unicode can add new blocks or assign characters to new code points. After the Rohingya crisis in Myanmar, Unicode rushed to include the Rohingya script in its standard to ensure that agencies could produce Rohingya language materials that could be interpreted by any computer. In the past, a new script would necessitate a new font and a new encoding, and because this script depended on a font with its own encoding, there was no guarantee that a given computer could read a document written in this way. Unicode solves this by putting every script into a single standard that is readable by just about any modern computer.

So given that Unicode seems to be the solution to our outdated MARC-8 system, why do we still stick to MARC-8? To a certain extent, we actually have made the switch. OCLC, a global cataloging cooperative, allows for the creation of records in Unicode, then allows participating libraries to export records in a variety of encodings, including MARC-8. The reason the switch hasn’t happened completely is largely to due to money and tradition.

On the money end, re-encoding the catalog has the potential to be quite costly. Library software is notoriously expensive and difficult to implement, so many libraries use legacy systems that don’t play well with Unicode. This decision, however, is largely at the level of the individual library, and I have no doubt that clever catalogers could tweak their software and their catalogs to use the Unicode standard.

Tradition as well plays a role. In the MARC catalog record, field 066 is used to indicate what scripts are present. This would be unnecessary if all scripts were inherently supported. Have a look at the mess we deal with now to see why keeping MARC-8 is such a bad idea. PCC, the Program for Cooperative Cataloging has also been slow to adopt Unicode. It has 4 divisions: BIBCO (most bibliographic records), NACO (name authorities), SACO (subject authorities), and CONSER (serials). Of these four, only BIBCO allows for the use of Unicode; the rest require MARC-8. And because PCC is the gold standard for cataloging, it means that they control the keys to Unicode.

It’s 2019. My phone can type and read just about any language I want it to. My computer has no trouble rendering Cyrillic or Mongolian or even Egyptian hieroglyphics. A person from Thailand could conceivably search for an author in an American catalog, but if that author is in Thai, they have to resort to transliterating their name according to a prescribed standard because NACO doesn’t allow us to enter names in vernacular scripts that MARC-8 doesn’t support.

The library world has resigned itself to abandoning MARC, not because it was bad, but because we have technology that allows us do so much more. We should be proud of the brilliant librarians who developed MARC and MARC-8, and the best way to honor their legacy is to move on to something even better.

What is a Character Set? (Part Two): MARC-8

Libraries are necessarily multilingual environments. Library materials arrive at catalogers’ desks in a wide variety of languages and catalog records need to be created for these materials.

In the late 1960s, libraries saw the potential of computers to organize the vast amount of data previously held in paper catalogs. Henriette Avram at the Library of Congress spearheaded this initiative, alongside staff at OCLC, which was founded in 1967.

A major early problem to be tackled was that of encoding. ASCII couldn’t cover anything but English, and certainly couldn’t begin to cover any non-Latin alphabet. As the computing world had not yet come up with a solid multi-script encoding standard, it was clear that libraries would have to develop their own.

Enter MARC-8. MARC-8 was introduced alongside the other MARC standards, and, for the most part, resembled ASCII in its earliest incarnations. Unlike ASCII, it employed 8 bits, rather than 7. To remedy the lack of non-English characters, a standard called ANSEL (American National Standard for Extended Latin Alphabet Coded Character Set for Bibliographic Use) was introduced. ANSEL added a number of characters not found in English, as well as a few symbols: æ, ð, ©, ư, ı, etc. Crucially, ANSEL included a number of diacritics that could be stacked above or below existing letters to create the accented characters: á, ğ, è, ü. These diacritics also took up 8 bits and were placed before the character that they modify, e.g. ¨u.

What is brilliant about this system is that we gain a huge number of new characters without having to expand the number of bits that every single character uses. In MARC-8/ANSEL, we have 256 possible code points. If, however, we had to add new code points for every single combination of diacritic + character, we would quickly run out of space.

Although 8 bits should allow for 256 code points, in reality, we only have 94. The first bit is used to allow for the use of 2 different tables, 32 of the remaining 128 are control characters, and 2 are reserved. By referring back to a 7-bit system, MARC-8 was able to maintain a level of backward compatibility with ASCII.

This system worked well enough for a time. Whenever a non-Latin script was encountered, catalogers could represent the characters in that script with a Latin language equivalents that could easily be converted back to the original script, but could also easily be entered and searched for by anyone who only had access to a computer and keyboard that could only work with Latin characters. Over time, these correspondences were formalized under the ALA-LC Romanization scheme. This meant that anyone who saw Krasnoi︠a︡rsk in a MARC record knew that the Cyrillic equivalent should be Красноярск.

Where this system ran into trouble was with non-alphabetic scripts. Ideally, there should be a direct correspondence between non-Latin symbols and Latin symbols. This works well for many familiar writing systems like Cyrillic and Greek, not to mention Hindi, Cherokee, Mongolian, or Amharic. However, some writing systems (Arabic, Hebrew) do not require vowels to be written. And others (like Chinese hanji, which are also often employed in Japan and the Koreas) use single symbols to represent whole words or parts of words. For these writings systems, any Romanization scheme would either produce something illegible (e.g. alardn to represent Arabic Al-ʾUrdunn “Jordan”) or simply would not work, as with Chinese hanji.

To remedy this, the JACKPHY initiative was founded in 1979. JACKPHY, which stands for Japanese, Arabic, Chinese, Korean, Persian, Hebrew, Yiddish, sought to include the native script for these languages within MARC records. This is the point at which non-Roman characters entered the MARC record.

While allowing for the use of non-Roman scripts in MARC records solved many problems, it created new ones. Namely, how do we encode the enormous number of new characters that we are allowing into our record sets?

For character sets with a relatively small number of characters, the answer was fairly simple: set up separate code charts for these alphabets, then tell the computer program reading the MARC record which character set to use. In the 880 fields, which contain the native script equivalent of romanized fields, a tag is inserted telling the computer how to interpret the MARC-8 codes:

$1Chinese, Japanese, Korean

066 subfield ǂc can also be used to tell the computer what scripts to watch out for.

Where things get weird is with Chinese, Japanese, and Korean (the CJK scripts). Due simply to the huge number of characters employed by Chinese, it would be impossible to encode everything in 8 bits. Instead, the East Asia Coded Character (EACC) was adopted. When the $1 tag is present the computer knows to read three strings of 7-bits as one. In effect, this gives the benefit of having 21 bits available without actually having to have a 21-bit character set.

Looking at the tags above, you’ll notice that Greek and Cyrillic are also included. These two scripts were added later on, likely due to the number of materials in these languages received by American libraries, and due to the cultural significance to American scholarship.

For some 40 years, American libraries have relied on this system to encode and display information in a wide range of languages. For the most part, attempts to update encoding systems have failed, likely due to cost and complication, and because so many records at so many institutions would have be changed if a new encoding standard were adopted.

Next post: UNICODE: the future is already here.

What is a Character Set? (Part One)

One of the core issues in multilingual cataloging is the character set. You may have noticed that many library catalogs allow for titles and other information to appear in Russian, Chinese, Hebrew, or Arabic, but not in Hindi, Thai, Armenian, or Cherokee. This all has to do with the character sets supported by our cataloging systems.

At its core, a character set is a way to tell a computer to display a series of 1s and 0s as the symbols you see on your screen. The way in which these codes are processed is known as a character encoding. Although the world has mostly reached some agreed-upon standards for character encodings (more on this later), sometimes you may see documents displayed using incorrect encoding. This is why you sometimes see webpages or e-mails display as gibberish, rather than displaying in the correct form. For further examples, see the W3 page explaining this.

The reason we have these problems is because space and processing constraints required us to use different character encodings that were capable of displaying different character sets. Computers operate on a series of binary operators: yes/no, true/false, 0/1. Each of these operators is a bit, which takes up space, and which needs to be read by a program, which takes time

Consider, then, that we need to express the alphabet in bits. In the early days of computing, programmers focused on English (in the US, at least). This requires 26 uppercase letter, 26 lowercase letters, 10 numerals, and punctuation and symbols necessary to encode mathematical and accounting concepts. Additionally, we need to express things like spaces and carriage returns. One of the earliest systems for encoding letters as bits is ASCII: American Standard Code for Information Interchange, which was officially implemented in 1963. This system uses 7 bits to express these symbols: 2^7=128, which means we can express 128 characters in total. This image from Wikipedia expresses how this would look:


A word like “cat” takes up 21 bits, “book” takes of 28, etc. etc. Overall, not too bad. This remained the standard in the USA until the 1980s; other countries with their own needs created various 6-7 bit encoding systems.

As computers gained storage and increased in processing speed, it became possible to increase the number of bits in an encoding system. This allowed us to add characters necessary to encode non-English symbols: ñ, ÿ, é, etc. These are usually called extended ASCII, and they employ 8 bits (and a total of 256 characters), which increases the number of possible characters, but also the necessary space and processing power. At the same time, standards were set for a number of different writing systems and character sets. Computers needed to be able to distinguish these encoding standards, otherwise gibberish would result. From the 1980s until the 1990s, this multitude of systems co-existed with varying degrees of success.

In the late 1960s, libraries began to explore digitizing catalogs. Because few standards had been set by this point, and because libraries dealt with materials in a wide range of languages, the library community had to decide how to deal with this problem. More MARC-8 and UNICODE in the next post.