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

toProperCase with UTF Characters #266

Open
Demonslay335 opened this issue Apr 29, 2016 · 0 comments
Open

toProperCase with UTF Characters #266

Demonslay335 opened this issue Apr 29, 2016 · 0 comments

Comments

@Demonslay335
Copy link

I have had a few users note that their language's text is improperly capitalized. I have traced this down to the toProperCase() function. It ends up capitalizing the first Latin character, making some texts look funny. This is easily reproducible even with the demo. An example language is Czech (becomes "čEština" instead of "Čeština").

I believe the issue is with the regex replace() part. The closure part works fine if isolated, since toUpperCase() works on UTF-8 natively.

return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()

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

1 participant