Actions
Feature #12419
closedImprove String#dump for Unicode output (from "\u{130}" to "\u0130")
Description
Currently, "İİİ".dump
produces "\u{130}\u{130}\u{130}"
.
This is rather suboptimal, "\u0130\u0130\u0130"
is shorter and easier to read.
The only time \u{} notation should be used is when more than four hex digits are needed.
Updated by matz (Yukihiro Matsumoto) over 8 years ago
Agreed.
Matz.
Updated by duerst (Martin Dürst) over 8 years ago
- Assignee set to hsbt (Hiroshi SHIBATA)
Updated by duerst (Martin Dürst) over 8 years ago
- Assignee changed from hsbt (Hiroshi SHIBATA) to duerst (Martin Dürst)
Updated by duerst (Martin Dürst) over 8 years ago
- Related to Feature #12275: String unescape added
Updated by duerst (Martin Dürst) over 8 years ago
- Status changed from Open to Closed
Applied in changeset r55728.
- string.c (String#dump): Change escaping of non-ASCII characters in
UTF-8 to use upper-case four-digit hexadecimal escapes without braces
where possible [Feature #12419]. - test/ruby/test_string.rb (test_dump): Add tests for above.
Actions
Like0
Like0Like0Like0Like0Like0