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]>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] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

