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

Unicode title casing doesn't work if first character expands into more than one character #28

Closed
ptomato opened this issue Feb 22, 2016 · 1 comment

Comments

@ptomato
Copy link
Member

ptomato commented Feb 22, 2016

Opened 2011-05-08:

Upper- or lowercasing Unicode strings is not possible by mapping one character to one character in each case, in contradiction of what the GLib functions g_unichar_tolower() and g_unichar_toupper() would seem to suggest. There is unfortunately no title-casing function in GLib that allows for the title-case of a character to be longer than one character, so we either have to wait for one to be added, or roll our own.

@ptomato
Copy link
Member Author

ptomato commented Jun 15, 2016

ptomato added a commit that referenced this issue Sep 24, 2023
Fixes a long-standing bug with glk_buffer_to_title_case_uni() where the
results would be incorrect for characters that expand into more than one
character in titlecase. We hardcode a list of titlecase exceptions from
Unicode, and otherwise continue to use the GLib 1-to-1 mapping from
g_unichar_totitle().

Closes: #28
ptomato added a commit that referenced this issue Sep 24, 2023
Fixes a long-standing bug with glk_buffer_to_title_case_uni() where the
results would be incorrect for characters that expand into more than one
character in titlecase. We hardcode a list of titlecase exceptions from
Unicode, and otherwise continue to use the GLib 1-to-1 mapping from
g_unichar_totitle().

Closes: #28
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

1 participant