Skip to content

Commit fe512c5

Browse files
committed
Initial commit: LICENSE, README, and importable Python package.
0 parents  commit fe512c5

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

Diff for: LICENSE

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Copyright (c) 2012 by Simon Sapin.
2+
3+
Some rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above
13+
copyright notice, this list of conditions and the following
14+
disclaimer in the documentation and/or other materials provided
15+
with the distribution.
16+
17+
* The names of the contributors may not be used to endorse or
18+
promote products derived from this software without specific
19+
prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Diff for: README.rst

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
python-webencodings
2+
===================
3+
4+
This is a Python implementation of the `WHATWG Encoding standard
5+
<http://encoding.spec.whatwg.org/>`.
6+
7+
In order to be compatible with legacy web content
8+
when interpreting something like ``Content-Type: text/html; charset=latin1``,
9+
tools need to use a particular set of aliases for encoding labels
10+
as well as some overriding rules.
11+
12+
For example, ``US-ASCII`` and ``iso-8859-1`` on the web are actually
13+
aliases for ``windows-1252``, and an UTF-8 or UTF-16 BOM takes precedence
14+
over any other encoding declaration.
15+
16+
The Encoding standard defines all such details so that implementations do
17+
not have to reverse-engineer each other.

Diff for: webencodings/__init__.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
3+
webencodings
4+
~~~~~~~~~~~~
5+
6+
This is a Python implementation of the `WHATWG Encoding standard
7+
<http://encoding.spec.whatwg.org/>`. See README for details.
8+
9+
:copyright: Copyright 2012 by Simon Sapin
10+
:license: BSD, see LICENSE for details.
11+
12+
"""

0 commit comments

Comments
 (0)