Le 11/04/2013 16:30, Fredrik Håård a écrit :
So, I take it no-one is working on codecs, is anyone interested in codecs?

Hi,

A while ago I started implementing in Rust the WHATWG Encoding specification:

http://encoding.spec.whatwg.org/

In addition to the actual algorithms (and precise error handling), the spec defines a set of labels that should be used for legacy web content.

For example, when getting 'Content-Type: text/html;charset=ISO-8859-1', it’s the Windows-1252 encoding that should actually be used. It’s also important that labels *not* on the list are not supported. UTF-7 for example has known security issues.

Servo will need this eventually.


A general-purpose library might want to support encodings that are not supported on the web, such as UTF-32. One should be careful to provide a separate API, so as not to expose these encodings to the web.


My implementation is very much incomplete and kind of abandoned at the moment. I expect to start working on it again in the next few months. If someone wants to take it up in the meantime, feel free to do so. Or start from scratch, there really isn’t much there.

https://github.com/SimonSapin/rust-webencodings



I've started prototyping a solution patterned on Python (i.e. a tool to
generate specific codec modules from the specs).

What does "patterned on Python" mean?

--
Simon Sapin
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to