Closed
Description
(imported from improperly closed bug #22412)
pub fn main() {
println!("{}", "äöüß");
println!("{:?}", "äöüß");
}
prints:
äöüß
"\u{e4}\u{f6}\u{fc}\u{df}"
but probably should print:
äöüß
"äöüß"
(See discussion on #22412 for strategies for fixing this; team seemed pretty much on board for this change.)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
str
writes one byte at a time #26920fmt::Debug
forstr
andchar
#28662steveklabnik commentedon Jun 6, 2016
Triage: no change. I do wonder about this kind of change with regards to stability though.
estebank commentedon Nov 15, 2016
I see where the sentiment comes from, but do consider that there're multiple ways to encode the same visual output.
Debug
using the\u{}
format for those characters helps differentiate easily betweenö
ando¨
, for example.bluss commentedon Nov 15, 2016
This was fixed in #34485 and the examples in the original report have the desired output.