Skip to main content

Crate mongol_convert

Crate mongol_convert 

Source
Expand description

§mongol-convert

Pure-Rust core of the Mongolian Encoding Converter (mongol-convert), ported from the original Java library com.zvvnmod.mongolconvert.

Design & decisions: docs/superpowers/specs/2026-06-18-meco-rust-port-design.md.

Ground rules baked into this crate:

  • Generated Java tables are the historical behavior baseline; Rust-owned Zvvnmod rules may intentionally override them when the project adopts corrected semantics.
  • Conversions route through the intermediate Zvvnmod encoding.
  • The build has no I/O or framework and is pure compute on every platform, including wasm32-unknown-unknown. UTN #57 target conversion is linked in through the pure-Rust zvvnmod-utn57 crate; no external command or interpreter is started.

Status: scaffolding — the shared spine (encoding types, errors, string helpers) is in place. Translation routing and the shape/letter subsystems are added in later steps.

Structs§

Translation
A finished conversion: the text, and whatever the conversion had to do beyond what the input said. See translate_with_warnings.
TranslationOptions
Optional processing before conversion. Default settings preserve the input behavior of translate.

Enums§

CodeSeries
Dispatch classification: a code is decoded/encoded either via the letter rules or the shape rules. Port of CodeSeries.java.
CodeType
The supported Mongolian encodings. One variant per Java CodeType (in declaration order). Zvvnmod is the intermediate hub. Port of CodeType.java lines 14-20.
MongolConvertError
Warning
Something a conversion did beyond what its input said, including optional heuristic repairs.

Functions§

restore_menk_shape_emoji
Restore legacy SoftBank/iOS emoji that collide with MenkShape PUA.
translate
Convert input from one Mongolian encoding to another. UTF-8 in/out.
translate_with_options
Convert with optional input repair. Repairs run before source decoding, even when from == to. With default options this is identical to translate_with_warnings.
translate_with_warnings
Convert input from one Mongolian encoding to another, and say what the conversion had to do beyond what the input said. UTF-8 in/out.
version
Crate version (currently just the Cargo package version). A table-provenance tag (the Java commit the generated tables come from) will be appended once tables exist.