<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hello!</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I am writing a font editor called MFEK in Rust which required me to explore the ICU data.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I didn't want to use libicu's C binding just to get this data, so after some trial and error I figured out how to include the data in a compressed form in the library, and added an in-memory index for it.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">The crate is called icu-data: <a href="https://docs.rs/icu-data/0.1.0/icu_data/">https://docs.rs/icu-data/0.1.0/icu_data/</a></p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">crates.io page: <a href="https://crates.io/crates/icu-data">https://crates.io/crates/icu-data</a></p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">For example, if you look at "glibc-IBM437-2.1.2", you get something back that starts like this:</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="font-family:Monospace;">Encoding { metadata: {"mb_cur_max": "1", "mb_cur_min": "1", "subchar": "\\x1A", "uconv_class": "SBCS", "code_set_name": "IBM437"}, codepoints: [Codepoint { uni: '\u{0}', eq_type: Type0, bytestring: [0] }, Codepoint { uni: '\u{1}', eq_type: Type0, bytestring: [1] }, Codepoint { uni: '\u{2}', eq_type: Type0, bytestring: [2] }, Codepoint { uni: '\u{3}', eq_type: Type0, bytestring: [3] }, ... states: [] }</span></p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I didn't have a need for anything but the UCM charset files at this time, but if anyone is interested in adding a module for the other ICU data this is a place to start.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Best,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Fred Brennan</p>
</body>
</html>