W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2014

Re: DOMString UTF-16

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 16 Jan 2014 21:08:24 +0100
To: Graham Houston <housty.g@gmail.com>
Cc: www-dom@w3.org
Message-ID: <gpegd9hgrauhbddhlas56oomfk6n3v8and@hive.bjoern.hoehrmann.de>
* Graham Houston wrote:
>Was pondering the requirement for UTF-16 for DOMString and it seems it
>could be more beneficial if this was an implementation decision on Unicode
>and not a requirement, after all UTF-8 is now the more favourable encoding
>in use today not to mention its more to do with internal handling of
>strings than the final overall use of those strings. How my DOM handles
>Unicode inside should not affect how my DOM handles transfer encodings
>overall as an API and on that grounds I see no reason for DOMString to be a
>UTF-16 requirement.

While some of the DOM specifications says otherwise, implementations can
and some in fact do use other storage internally. What matters is only
the external behavior. There are, as an aside, various ways to use UTF-8
internally while exposing UTF-16-like behavior externally without notab-
ly affecting performance. It is entirely possible some of the major web
browsers will do that at some point.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 16 January 2014 20:09:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:22 UTC