ibm1047 1.0.0

String conversions to and from IBM-1047
Documentation
  • Coverage
  • 12.5%
    1 out of 8 items documented1 out of 8 items with examples
  • Size
  • Source code size: 11.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • AidoP/ibm1047
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AidoP

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);