Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 5 users
Status: Fixed
Closed: Oct 2014
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Status: ----
Launch-Test: ----
Launch-UI: ----
Product-Review: ----

Blocked on:
issue 243354

Sign in to add a comment
Text Encoding API
Project Member Reported by, Jul 28 2014 Back to list
Change description:

Expose text encoding (binary data to/from strings) to script. For example, extract utf-8 encoded data from a Blob fetched over XHR.

Changes to API surface:

Add TextEncoder, TextDecoder global constructors, which take an encoding label and options. TextEncoder has 'encode()' method, and (surprise!) TextDecoder has 'decode()'. 


Support in other browsers:
Internet Explorer: no signals
Firefox: supported
Safari: no signals

Comment 1 by, Oct 25 2014
It seems that these APIs are already implemented, so this issue could be probably closed.
I just have yet a question:
A part of the functionality of TextDecoder is also provided by FileReader.
FileReader is async, but TextDecoder not. Is this only needed for FileReader because it can also read files from disk, meaning that I could safely switch to TextDecode?
Comment 2 by, Oct 27 2014
Status: Fixed
Ah, yes - this was filed as a launch tracking bug. Implementation was tracked in  issue 243354  - but this should be close.
Comment 3 by, Oct 27 2014
Re: FileReader

Yes, that API is wrapping up both the async reading (e.g. from disk, or shipping data across processes) and decoding (synchronous - since it's a pure memory operation). If you've got all the data in-process already you can use the sync API.

(Although if you were processing large amounts of data you might want to defer it to a Worker.)

Where is Chromium's Encoding API support documented?
Sign in to add a comment