Crate rust_icu_ucnv

source ·
Expand description

ICU character conversion support for rust

This crate provides character encoding translation, based on the conversion functions implemented by the ICU library. Specifically the functionality exposed through its C API, as available in the header ucnv.h.

The main type is UConverter, which can be created using UConverter::open with an encoding name (as a &str). This type provides conversion functions between UTF-16 and the provided encoding.

This crate also provides utf8::Converter as a convenience type to work directly with UTF-8 strings, such as with Rust’s &str and String types.

For more information on ICU conversion, an interested reader can check out the conversion documentation on the ICU user guide.

Are you missing some features from this crate? Consider reporting an issue or even contributing the functionality.




  • Get an iterator over all aliases for the provided converter name (which may not necessarily be the canonical converter name).
  • Get an iterator over all canonical converter names available to ICU.