IBM-1047
Conversions to and from IBM-1047 in Rust.
\n
is encoded as 0x15
and U+0085
is encoded as 0x25
.
Usage
use Encode;
// Warning: flatten will discard characters that cannot be encoded as IBM-1047.
let ebcdic: = "Hello, World!\n".encode_ibm1047.flatten.collect;
let string: String = decode.collect;
assert_eq!;
Decoding directly to a string requires the alloc
feature.
use Decode;
let name = String from_ibm1047;