- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Thu, 22 Aug 2013 09:59:14 +0100
- To: Alexey Proskuryakov <ap@webkit.org>
- Cc: WHAT Working Group <whatwg@lists.whatwg.org>, Kent Tamura <tkent@chromium.org>, Norbert Lindenberg <w3@norbertlindenberg.com>, Richard Ishida <ishida@w3.org>, Ryosuke Niwa <rniwa@apple.com>
On Wed, Aug 21, 2013 at 8:19 PM, Alexey Proskuryakov <ap@webkit.org> wrote: > FWIW, this is tracked for WebKit as <https://bugs.webkit.org/show_bug.cgi?id=120030>. I think Darin's comment about the server component makes sense. My remark was mostly as to what is exposed to JavaScript. I don't think we expose an API to measure the number of grapheme clusters in a given string at the moment and writing such a function might be rather hard. (Although if maxlength was redefined to work this way...) Considering end users makes sense too, but we should also consider what applications people want to write. From limited testing I believe Twitter currently counts Unicode scalar values. This is somewhat better than code units, but e.g. U+0041 U+030A still subtracts two from your 140 limit. (This also means the example in the specification that makes a jab at Twitter is technically incorrect.) (Not that Twitter's current control could be implemented with a plain <input> or <textarea>.) All choices seem to have drawbacks of sorts. I wonder if Norbert or Richard have an informed opinion. Rest of the thread is archived here: http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Aug/thread.html#msg184 -- http://annevankesteren.nl/
Received on Thursday, 22 August 2013 08:59:47 UTC