UTF-12 encoder based on the tapemark article
Original tapemark article: https://tapemark.narod.ru/comp/utf12en.html
Following the specs, everything is in big-endian. Ensure that inputs are big-endian.
Encodes unicode characters 07c0-D7ff, e000-10ffff
pip install utf12
from utf12 import encode, decode
encoded_bytes = encode("R2-D2")
print(decode(encoded_bytes))
unicode_characters is a python string of unicode characters Returns a bytes object of the slabs with trailing 0 bits on the last byte if needed
slabs is a bytes object of the slabs for the characters Returns a python string of the unicode characters