Re: [swift-dev] Combining Skin Tone Emoji Into Single Extended Grapheme Clusters

2015-12-22 Thread Dmitri Gribenko via swift-dev
On Tue, Dec 22, 2015 at 12:10 AM, Michael Buckley via swift-dev < swift-dev@swift.org> wrote: > It actually appears that Swift already links against ICU. I'll see if I > can hook Swift up to ICU's grapheme separation code. > Hi Michael, Thank you for the investigation. Yes, calling into ICU for

Re: [swift-dev] Combining Skin Tone Emoji Into Single Extended Grapheme Clusters

2015-12-22 Thread Michael Buckley via swift-dev
It actually appears that Swift already links against ICU. I'll see if I can hook Swift up to ICU's grapheme separation code. On Sun, Dec 20, 2015 at 10:41 PM, Michael Buckley wrote: > After reading through the ICU sources, if I understand them correctly, ICU > uses the Aho–Corasick algorithm to

Re: [swift-dev] Combining Skin Tone Emoji Into Single Extended Grapheme Clusters

2015-12-20 Thread Michael Buckley via swift-dev
After reading through the ICU sources, if I understand them correctly, ICU uses the Aho–Corasick algorithm to determine grapheme breaks, word breaks and line breaks, and then does some post-processing after matching using the algorithm. This allows ICU to solve the regional indicator problem by in

Re: [swift-dev] Combining Skin Tone Emoji Into Single Extended Grapheme Clusters

2015-12-18 Thread Michael Buckley via swift-dev
Thanks for the response, Dimitri. My comments inline below. On Fri, Dec 18, 2015 at 3:29 AM, Dmitri Gribenko wrote: > > > One thing to do would be to check the Apple's ICU implementation, which (I > think) implements some extra handling for UTR #51 ( > http://opensource.apple.com/release/os-x-101

Re: [swift-dev] Combining Skin Tone Emoji Into Single Extended Grapheme Clusters

2015-12-18 Thread Dmitri Gribenko via swift-dev
Hi Michael, On Thu, Dec 17, 2015 at 9:16 PM, Michael Buckley via swift-dev < swift-dev@swift.org> wrote: > Hello, > > I would like to fix rdar://20511834 , which is that the new skin tone and > multi-person grouping emoji introduced with iOS 8.3 and OS X 10.10.3 are > represented as multiple exte