Closed
Description
Environment
rustc --version
output:
rustc 1.27.0-nightly (0b72d48f8 2018-04-10)
and my encoding_rs version is 0.7.2
.
Steps to reproduce
run the following program
extern crate encoding_rs;
use encoding_rs::UTF_16LE;
fn main() {
let s = "aa";
let (bytes, enc, unmappable) = UTF_16LE.encode(s);
let (dec, enc, unmappable) = UTF_16LE.decode(&bytes);
for i in dec.chars() {
println!("{}", i as i32)
}
println!("{}", dec);
}
Expected
output following text
97
0
97
0
aa
Actual
output following text(24929 = 0x6161)
24929
慡
Metadata
Assignees
Labels
No labels
Activity