Skip to content

fmt::Debug should not escape printable characters #24588

Closed
@pnkfelix

Description

@pnkfelix

(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

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions