# Mojikyō

Mojikyō (Japanese: 文字鏡), also known by its full name Konjaku Mojikyō (今昔文字鏡, lit. '(the) past and present character mirror'), is a character encoding scheme created to provide a complete index of characters used in the Chinese, Japanese, Korean, Vietnamese Chữ Nôm and other historical Chinese logographic writing systems. The Mojikyō Institute (文字鏡研究会, Mojikyō Kenkyūkai), which published the character set, also published computer software and TrueType computer fonts to accompany it. The Mojikyō Institute, chaired by Tadahisa Ishikawa (石川忠久), originally had its character set and related software and data redistributed on CD-ROMs sold in Kinokuniya stores.
Conceptualized in 1996, the first version of the CD-ROM was released in July 1997. For a time, the Mojikyō Institute also offered a web subscription, termed "Mojikyō WEB" (文字鏡WEB), which had more up-to-date characters.
As of September 2006, Mojikyō encoded 174,975 characters. Among those, 150,366 characters (≈86%) then belonged to the extended Chinese–Japanese–Korean–Vietnamese (CJKV) family. Many of Mojikyō's characters are considered obsolete or obscure, and are not encoded by any other character set, including the most widely used international text encoding standard, Unicode.
Originally a paid proprietary software product, as of 2015, the Mojikyō Institute began to upload its latest releases to Internet Archive as freeware, as a memorial to honor one of its developers, Tokio Furuya (古家時雄), who died that year. On 15 December 2018, version 4.0 was released. The next day, Ishikawa announced that without Furuya this would be the final release of Mojikyō.

## Premise

The Mojikyō encoding was created to provide a complete index of characters used in the Chinese, Japanese, Korean writing systems and Vietnamese Chữ Nôm logographic scripts. It also encodes a large number of characters in ancient scripts, such as the oracle bone script, the seal script, and Sanskrit (Siddhaṃ). For many characters, it is the only character encoding to encode them, and its data is often used as a starting point for Unicode proposals. However, Mojikyō has much looser standards than Unicode for encoding, which leads Mojikyō to have many encoded glyphs of dubious, or even unintentionally fictional, origin. As such, while many non-Unicode Mojikyō characters are suitable for addition to Unicode, not all can become Unicode characters, due to the differing standards of evidence required by each.

## Composition

The Mojikyō fonts (文字鏡フォント) are TrueType fonts that come in a ZIP file and are each around 2–5 megabytes; the different fonts contain different numbers of characters. Also included is a Windows executable that implements a graphical character map, the "Mojikyō Character Map" (文字鏡MAP), MOCHRMAP.EXE. MOCHRMAP.EXE allows users to browse through the Mojikyō fonts, and copy and paste characters in lieu of typing them on the keyboard. As opposed to the regular Windows character map, or for that matter KCharSelect, which both support TrueType fonts, MOCHRMAP.EXE displays the numbered Mojikyō encoding slot of the requested character. In order for MOCHRMAP.EXE to work, all Mojikyō fonts must be installed.

## Encoding

When referring to a character encoded in Mojikyō, the format MJXXXXXX is often used, similar to the U+XXXX format used for Unicode. For example, hentaigana U+1B008 𛀈 HENTAIGANA LETTER I-3 has Mojikyō encoding MJ090007 and Unicode encoding U+1B008. A difference, however, is that Mojikyō encodings displayed this way are decimal, while Unicode's U+ encoding is hexadecimal.
From the earliest days of Unicode, Mojikyō has both influenced—and been influenced by—the standard. Glyphs originating from Mojikyō first appear in a proposal to the Ideographic Rapporteur Group (IRG), which is responsible for maintaining all CJK blocks in Unicode, on 18 April 2002. In May 2007, Mojikyō played a minor role in an eventually successful series of proposals to encode the Tangut script in Unicode; Mojikyō already had within its encoding 6,000 Tangut characters by October 2002.
The Unicode Standard's Unihan Database refers to Mojikyō as the "Japanese KOKUJI Collection" (日本国字集), abbreviated "JK". For example, U+2B679 𫙹 CJK UNIFIED IDEOGRAPH-2B679, an ideograph read in Japanese as burizādo (ブリザード, lit. 'blizzard'), has a J-Source equal to JK-66038. All Unicode characters with a JK-prefixed J-Source originate from Mojikyō. According to Ken Lunde, a subject matter expert in character encodings and East Asian languages, as of Unicode 13.0, 782 ideographs in Unicode originate from Mojikyō, split somewhat evenly between two blocks: CJK Unified Ideographs Extension C, with 367, and CJK Unified Ideographs Extension E, with 415. Not all Unicode characters with Mojikyō origins (JK-prefixed J-Sources) have the same representative glyph in the code chart as in the Mojikyō font; some characters had their shapes changed before final encoding, as investigation showed the shapes assigned by the Mojikyō Institute were wrong.

### Blocks

As of September 2006 it encoded 174,975 characters. Among those, 150,366 characters then belonged to the extended CJKV family. Many of the encoded characters are considered obsolete or otherwise obscure, and are not encoded by any other character set, including the international standard, Unicode. Each Mojikyō character has a unique number, and the characters are organized into blocks.
Mojikyō puts CJKV characters in different blocks according to their traditional Kangxi radical. Common radicals containing an especially high number of characters, such as Radicals 9 (人) and 162 (⻌), are split further by stroke order.

### No unification

Unlike Unicode, Mojikyō purposely avoids Han unification; no attempt at compactness of the encoding is made, nor is there an attempt to keep all common characters below U+FFFF as there is in Unicode.
Unicode, on the other hand, sorts its CJK into blocks based on how common they are: the most common are generally put into the Basic Multilingual Plane, while those that are rare or obscure are put into the Supplementary Planes.
For example, Radical 9 has two characters where Unicode has one: MJ054435 (令), and MJ059031 (令), both represented in Unicode as U+4EE4 令 CJK UNIFIED IDEOGRAPH-4EE4.

## License

Mojikyō is proprietary software under a restrictive license. Originally, the Mojikyō Institute tried to prevent its character data from being used, and threatened those who published conversion tables to and from its character set. In July 2010, the Mojikyō Institute abandoned its legal efforts to stop at least one Japanese user from publishing conversion tables or converting characters encoded in Mojikyō to Unicode or other character sets. Mere data, sometimes including the shapes of letters, are considered in many jurisdictions to be common property as they do not meet the threshold of originality.
Due to this legacy, however, GlyphWiki [ja] disallowed Mojikyō data as of 2020.

## Collected writing systems
### Living

* Chinese — Hanzi
* Japanese — Kanji, Kana (including Hentaigana)
* Korean — Hanja
* Latin alphabet with diacritics
* Cyrillic script with diacritics

### Dead or obsolete

* Ancient Chinese
** Oracle bone script
** Seal script
* Taiwanese kana
* Vietnamese — Chữ Nôm
* Sanskrit — Siddhaṃ
* Tangut script
* Sui script