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

Implementation of String.prototype.localeCompare() options.sensitivity? #9

Open
binki opened this issue Apr 20, 2015 · 0 comments
Open

Comments

@binki
Copy link

binki commented Apr 20, 2015

I’m interested in the basic idea of lasca—providing an environment-independent implementation of String.prototype.localeCompare() to enable compatibility between server/client/other client code. However, for my use, I need to be able to check if different strings are considered equivalent while ignoring case differences or accent presence/absence and to have that difference be configurable so that strict equivalence can be enforced if desired. I cannot figure out what API I would use in lasca for this and am inclined to believe it doesn’t support this sort of thing at all.

Is this something that is meant to be supported? How would lasca support it? Would I need to generate a collation table for each different sensitivity and implement my own code to provide a mapping between locale+sensitivity onto whatever needs to be passed to lasca.setLanguage()?

If an example or general outline of how to do this with lasca could be added to the README, that’d be very helpful.

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