Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.string does not take title case into account #9979

Open
dlangBugzillaToGithub opened this issue May 29, 2013 · 2 comments
Open

std.string does not take title case into account #9979

dlangBugzillaToGithub opened this issue May 29, 2013 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

monarchdodra reported this on 2013-05-29T09:53:36Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=10204

CC List

Description

Unicode 6.2.0 introduces the notion of "Title case", making the trio of:

"Lower case" => "Title case" => "Upper case"

Example:
01c6  01c5  01c4
dž     Dž     DŽ

This means that functions such as "capitalize" are wrong because they make the assumption that "Capitalize" == "Uppercase"

Also, the tests such as:

if(std.uni.isLower(c))
    c = std.uni.toUpper(c);

are wrong, as non lower case characters may have upper case representations...
@dlangBugzillaToGithub
Copy link
Author

monarchdodra commented on 2013-05-29T12:19:47Z

Partially fixed here:
https://github.com/D-Programming-Language/phobos/pull/1322

Fixes only to[Upper|Lower](InPlace).

however, "capitalize" is still broken.

@dlangBugzillaToGithub
Copy link
Author

bugzilla (@WalterBright) commented on 2019-12-20T14:20:34Z

I don't completely understand the problem. Could you provide an example which produces a wrong output together with a note, what it should produce?

@LightBender LightBender removed the P3 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants