https://issues.dlang.org/show_bug.cgi?id=16210
Jakub Łabaj <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Jakub Łabaj <[email protected]> --- Assuming "ö" == [0xC3, 0xB6], which one version would be correct: a) behaviour of std.utf.byCodeUnit, just go by code units backward: "ö".byUTF!char().back == 0xB6 b) decode the character and return its first code unit: "ö".byUTF!char().back == 0xC3 Personally I thought the b) version is desired (docs says that byUTF encodes input), but at the moment it passes some inputs to byCodeUnit - it means for some ranges byUTF is bidirectional already and version a) applies. --
