couchbaselabs/walrus

CollateJSON doesn't support proper unicode collation of strings

Closed this issue · 7 comments

Added failing test case in this commit:

7a106d5

I changed the code to use the icu collator available in one of go's experimental packages.

af4ca89

Test cases that were failing now pass, however I would welcome review from others that know more about ICU collation.

@dustin @snej

I would assume the ICU package requires cgo, which would be quite
undesirable. Does the Unicode package help?
On Mar 26, 2013 8:42 AM, "Marty Schoch" notifications@github.com wrote:

I changed the code to use the icu collator available in one of go's
experimental packages.

af4ca89af4ca89

Test cases that were failing now pass, however I would welcome review from
others that know more about ICU collation.

@dustin https://github.com/dustin @snej https://github.com/snej


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-15466063
.

Ah, good point. I'll roll this back here and just create a new implementation (cgo is OK for my needs).

The Unicode package doesn't offer any collation methods. Perhaps some of the primitives there could be used to improve what we have, but my understanding is that the rules are complex.

Reverted

I don't think this is using cgo as the upstream has no C code. Let's go ahead and move this in if it solves problems.

Marty, can you go ahead and push your icu change in?

I talked to @snej about this briefly and he sounded like it was a known issue he didn't have time to investigate, but your solution seems like a good one.

Never mind, I see that you had just reverted it. I reverted your revert. All tests pass. Thanks a lot!

(and sorry for the confusion, and the confusion about the confusion)