W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] BinaryEncoding for Typed Arrays using window.btoa and window.atob

From: Alain Couthures <alain.couthures@agencexml.com>
Date: Wed, 7 Aug 2013 10:55:05 +0000
To: Chang Shu <cshu01@gmail.com>, Anne van Kesteren <annevk@annevk.nl>
Message-Id: <0MRijR-1VZvE32tVR-00SfDx@mrelayeu.kundenserver.de>
Cc: WHATWG <whatwg@lists.whatwg.org>
Because I implemented MS-Office files manipulation in my browser-side XForms implementation, such TextDecoder and TextEncoder are very interesting.


Alain Couthures

agenceXML

http://www.agencexml.com/xsltforms




De : Anne van Kesteren
Envoyé : ‎mercredi‎ ‎7‎ ‎août‎ ‎2013 ‎06‎:‎28
À : Chang Shu
Cc : WHATWG

On Tue, Aug 6, 2013 at 9:48 PM, Chang Shu <cshu01@gmail.com> wrote:
> But it appears to me we have to introduce
> another pair of coders, say BinaryDecoder/BinaryEncoder, in addition
> to TextDecoder/TextEncode since the signatures of the decode/encode
> functions are different.

So TextDecoder is bytes to string and TextEncoder is string to bytes.
If we always represent the base64-variant as a sequence of bytes the
signature seems fine. If you want to get a string out of those bytes
again you could utf-8 decode it for instance.

I'd be interested in knowing what the level of interest is outside of
Google for this feature.


-- 
http://annevankesteren.nl/
Received on Wednesday, 7 August 2013 10:59:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC