ibm1047

Crates.ioibm1047
lib.rsibm1047
version1.0.0
sourcesrc
created_at2023-09-06 12:48:40.212972
updated_at2023-09-06 12:48:40.212972
descriptionString conversions to and from IBM-1047
homepage
repositoryhttps://github.com/AidoP/ibm1047/
max_upload_size
id965243
size11,839
AidoP (AidoP)

documentation

README

IBM-1047

Conversions to and from IBM-1047 in Rust.

\n is encoded as 0x15 and U+0085 is encoded as 0x25.

Usage

use ibm1047::Encode;

// Warning: flatten will discard characters that cannot be encoded as IBM-1047.
let ebcdic: Vec<u8> = "Hello, World!\n".encode_ibm1047().flatten().collect();
let string: String = ibm1047::decode(&ebcdic).collect();

assert_eq!(string, "Hello, World!\n");

Decoding directly to a string requires the alloc feature.

use ibm1047::Decode;
let name = String::from_ibm1047(&ebcdic);
Commit count: 1

cargo fmt