Closed
Description
The code uses c |= 0x1_0000_u32
where it should use c += 0x1_0000_u32
.
Test case:
use std::str;
fn main() {
let a = "\U00020000";
let b = a.to_utf16();
let c = str::from_utf16(b);
println!("{:?}", a);
println!("{:?}", b);
println!("{:?}", c)
}
Output:
"\U00020000"
~[55360u16, 56320u16]
~"\U00010000"
Expected output:
"\U00020000"
~[55360u16, 56320u16]
~"\U00020000"
Metadata
Metadata
Assignees
Labels
No labels