Fix `fmt::Debug` for strings, e.g. for Chinese characters #37855

Merged
merged 1 commit into from Nov 20, 2016

Projects

None yet

7 participants

@tbu-
Contributor
tbu- commented Nov 18, 2016

The problem occured due to lines like

3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;;
4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;;

in UnicodeData.txt, which the script previously interpreted as two
characters, although it represents the whole range.

Fixes #34318.

@tbu- tbu- Fix `fmt::Debug` for strings, e.g. for Chinese characters
The problem occured due to lines like

```
3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;;
4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;;
```

in `UnicodeData.txt`, which the script previously interpreted as two
characters, although it represents the whole range.

Fixes #34318.
d0bb7e1
@rust-highfive
Collaborator

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@tbu-
Contributor
tbu- commented Nov 18, 2016

I also added a little test for this new behavior.

CC @liigo
r? @alexcrichton

@alexcrichton
Member

@bors: r+

@bors
Contributor
bors commented Nov 18, 2016

📌 Commit d0bb7e1 has been approved by alexcrichton

@bors
Contributor
bors commented Nov 20, 2016

⌛️ Testing commit d0bb7e1 with merge 224f2ce...

@bors bors added a commit that referenced this pull request Nov 20, 2016
@bors bors Auto merge of #37855 - tbu-:pr_fix_debug_str, r=alexcrichton
Fix `fmt::Debug` for strings, e.g. for Chinese characters

The problem occured due to lines like

```
3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;;
4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;;
```

in `UnicodeData.txt`, which the script previously interpreted as two
characters, although it represents the whole range.

Fixes #34318.
224f2ce
@bors bors merged commit d0bb7e1 into rust-lang:master Nov 20, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
homu Test successful
Details
@bluss bluss added the relnotes label Nov 20, 2016
@liigo
Contributor
liigo commented Nov 23, 2016

@tbu- Nice work! I'v double checked in Chinese Windows. This PR did fixed #34318. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment