Following the publications of @oraec and their intentions to develop useful tools for working with Egyptian hieroglyphs based on unicode, I have found myself in the task of developing a simple converter from Manuel de Codage to Unicode (bi or tridirectional -> unicode, unicode_code and MdC).
MdCUnicodeConverter is a simple JavaScript library for converting between Unicode characters, Unicode codes, and Manuel de Codage (MdC) codes for Egyptian hieroglyphs.
- Download the unicodeConverter.js file.
- Include it in your HTML file.
<script src="path/to/unicodeConverter.js"></script>- Instantiate the
MdCUnicodeConverterclass. - Use the provided methods to perform conversions.
<script src="MdCUnicodeConverter.js"></script>
<script>
const converter = new MdCUnicodeConverter();
console.log(converter.convertFromUnicode("𓀀")); // { "unicode": "𓀀", "unicode_code": "13000", "mdc": "A1" }
console.log(converter.convertFromUnicodeCode("13000")); // { "unicode": "𓀀", "unicode_code": "13000", "mdc": "A1" }
console.log(converter.convertFromMdC("A1")); // { "unicode": "𓀀", "unicode_code": "13000", "mdc": "A1" }
</script>convertFromUnicode(unicode): Converts a Unicode character to its corresponding Unicode code and MdC code.convertFromUnicodeCode(unicodeCode): Converts a Unicode code to its corresponding Unicode character and MdC code.convertFromMdC(mdc): Converts an MdC code to its corresponding Unicode character and Unicode code.
This library is open source and available under the MIT License.
