-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
implement uc and lc in C for UTF-8 strings #99
Comments
The best resource I've found for this is: http://developer.gnome.org/glib/2.29/glib-Unicode-Manipulation.html |
Are these towupper and towlower? |
For characters, yes, and that's how they're implemented. For ASCII strings, this is pretty easy. For UTF-8 strings, it's complicated because in principle, you have to decode each character, call towupper/towlower on it, and then append it to a new string. But that's a really slow way to do it, when I suspect that UTF-8 might well be designed so that it can be done much faster than that. The glib reference is disheartening though since it says:
For now, I think I'm just going to keep the |
The German ß is an excellent example — although not for the reasons glib gives. It shouldn't be capitalized as two letters, but rather as a different unicode character that has one more byte in UTF-8:
That makes it really hard to write a fast, single-pass, in-place uppercasing function. We can still get most of the benefit by having something fast for the ASCII string case though. |
Commit 3f51323 implements fast, copying |
Closed by 7010db8. |
Add non-float tryparse compat
Fix invalid exercise UUIDs
…uliaLang#39833) $ git log --pretty=oneline --abbrev=commit 2b4bed9..6bb8306 6bb83068bd796c4890baaeb39628ff79a4979374 Stop the grace timer iff adding first handle (fix JuliaLang#99) (JuliaLang#102) af6864d8872247faf2a402d6b2baca5cb74ab96e fix ssh_key_pass bug (fix JuliaLang#91) (JuliaLang#100)
…uliaLang#39833) $ git log --pretty=oneline --abbrev=commit 2b4bed9..6bb8306 6bb83068bd796c4890baaeb39628ff79a4979374 Stop the grace timer iff adding first handle (fix JuliaLang#99) (JuliaLang#102) af6864d8872247faf2a402d6b2baca5cb74ab96e fix ssh_key_pass bug (fix JuliaLang#91) (JuliaLang#100)
fix deprecations
A single function may be able to do this depending on the details of UTF-8 encoding.
The text was updated successfully, but these errors were encountered: