For grapheme clusters, the use cases are pretty straightforward. Here are a few right off the top of my head:
- You have a field that is limited in length and you wish to truncate the text automatically (perhaps appending ellipses). You want to break the text on a grapheme boundary so that scripts like Indic don’t break specific syllables. - You wish to scroll some text a grapheme at a time. - You wish to select a bit of text, move the cursor, or any number of other visual text manipulations. Most of these you want grapheme boundary control (not character-level and definitely not code point) I’m sure Norbert is dying to share more use cases: we had scads of them when I was at Yahoo. For line breaking, the main thing would be to preformat some text. We (the Lab126 we) use line and word breaking all the time. Addison Phillips Globalization Architect (Lab126) Chair (W3C I18N, IETF IRI WGs) Internationalization is not a feature. It is an architecture. From: Mark Davis ☕ [mailto:[email protected]] Sent: Saturday, January 29, 2011 11:36 AM To: Shawn Steele Cc: [email protected] Subject: Re: Stupid i18n use cases question There are really 5 cases at issue: 1. Code point breaks 2. Grapheme-Cluster breaks (with three possible variants: 'legacy', extended, and aksha<http://www.unicode.org/glossary/#aksara>) 3. Word breaks 4. Line breaks 5. Sentence breaks Notes: * #1 is pretty trivial to do right in ES. * The others can be done in ES, but the code is more complicated -- the biggest issue is that they require a download of a possibly substantial amount of data. For certain languages, #3 requires considerable code and data. * Word-breaks are different than linebreaks; the latter are the points where you can wrap a line, which may include more than a word or come in the middle of a word. * For examples, see http://unicode.org/cldr/utility/breaks.jsp. I don't know about the specific use cases that Jungshik had in mind, but if you are doing client-side word-processing in ES (which various software does, including ours), then you want all of these, except perhaps #5. For example, a double-click uses #3. There are other use cases for #4 besides word processing; for example, break up long SMS's, we break at line-boundaries. I'm not saying that someone has to do this in ES; just giving an example outside of the word-processing domain. Mark — Il meglio è l’inimico del bene — On Sat, Jan 29, 2011 at 10:25, Shawn Steele <[email protected]<mailto:[email protected]>> wrote: On the phone yesterday we mentioned word/line breaking and grapheme clusters. It didn't occur to me to ask about the use cases. Why does someone need word/line breaking in js? It seems like that would better be done by my rendering engine, like the HTML layout engine or my edit control or something? -Shawn http://blogs.msdn.com/shawnste _______________________________________________ es-discuss mailing list [email protected]<mailto:[email protected]> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

