| Crates.io | gsm7-alt |
| lib.rs | gsm7-alt |
| version | 0.1.2 |
| created_at | 2025-09-19 18:47:32.667149+00 |
| updated_at | 2025-09-29 12:24:53.455762+00 |
| description | GSM7 encoding and decoding by integer. |
| homepage | |
| repository | https://github.com/Varelion/gsm7-alt |
| max_upload_size | |
| id | 1846768 |
| size | 406,767 |
This crate is really a “GSM 7-bit character set mapper”, not a full “GSM 7-bit encoder” in the SMS sense.
This crate provides:
Mapping between Unicode text and the GSM 7-bit character set (base + extension table).
Configurable handling of unsupported characters.
Utilities for checking compatibility and estimating length.
⚠️ Important: This crate currently maps characters to GSM 7-bit codes but does not perform septet packing (the bit-level compression used in SMS PDUs). If you need to generate raw SMS payloads, you must add an additional packing step.
Example usage: let decoded = gsm7_alt::decode(&data).map_err(|e| e.to_string())?;
use gsm7_alt::{encode, decode};
fn main() -> Result<(), Box
let encoded = encode(text)?;
let decoded = decode(&encoded)?;
assert_eq!(decoded, text);
println!("Decoded text: {}", decoded);
Ok(())
}