encoded 0.4.2

Macros converting character encodings at compile time
Documentation

encoded

Rust macros converting character encodings at compile time

install

cargo add encoded

usage

const BYTES: &[u8] = encoded::shift_jis!("漢字");
assert_eq!(BYTES, b"\x8a\xbf\x8e\x9a");

For more information, see the documentation.