Skip to content

Make char::to_upper and char::to_lower support Unicode #1985

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

Closed
catamorphism opened this issue Mar 15, 2012 · 2 comments
Closed

Make char::to_upper and char::to_lower support Unicode #1985

catamorphism opened this issue Mar 15, 2012 · 2 comments

Comments

@catamorphism
Copy link
Contributor

currently they're ASCII-only.

@graydon
Copy link
Contributor

graydon commented Mar 21, 2012

Unlikely. I think this is over the boundary of "stuff we're going to punt to libicu and provide in std, not core".

If it's confusing to have them in char, remove them from char and put them in libc, taking a c_char, to clarify that they do not work on Full Unicode. The unicode logic in core::char is confirmant, but minimal, not intended to be complete.

@graydon
Copy link
Contributor

graydon commented Mar 22, 2012

Also dupe of #1347

@graydon graydon closed this as completed Mar 22, 2012
catamorphism added a commit that referenced this issue Mar 23, 2012
As per Graydon's comments on #1985: remove char::to_lower and
char::to_upper. The str versions of these functions now call
libc::tolower and libc::toupper (using wrappers that cast between
char and c_char). Not sure how much better that is, but it at least
makes it clearer that these functions are Unicode-unsafe.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants