From 013273bd7ec5ed45dc823d0d607683b05ac80ba6 Mon Sep 17 00:00:00 2001 From: kleink Date: Wed, 26 Oct 2016 07:50:24 +0000 Subject: Import webencodings 0.5 as textproc/py-webencodings. This is a Python implementation of the WHATWG Encoding standard. In order to be compatible with legacy web content when interpreting something like Content-Type: text/html; charset=latin1, tools need to use a particular set of aliases for encoding labels as well as some overriding rules. For example, US-ASCII and iso-8859-1 on the web are actually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes precedence over any other encoding declaration. The Encoding standard defines all such details so that implementations do not have to reverse-engineer each other. This module has encoding labels and BOM detection, but the actual implementation for encoders and decoders is Python's. --- textproc/py-webencodings/DESCR | 13 +++++++++++++ textproc/py-webencodings/Makefile | 16 ++++++++++++++++ textproc/py-webencodings/PLIST | 20 ++++++++++++++++++++ textproc/py-webencodings/distinfo | 6 ++++++ 4 files changed, 55 insertions(+) create mode 100644 textproc/py-webencodings/DESCR create mode 100644 textproc/py-webencodings/Makefile create mode 100644 textproc/py-webencodings/PLIST create mode 100644 textproc/py-webencodings/distinfo (limited to 'textproc/py-webencodings') diff --git a/textproc/py-webencodings/DESCR b/textproc/py-webencodings/DESCR new file mode 100644 index 00000000000..190e3321cc9 --- /dev/null +++ b/textproc/py-webencodings/DESCR @@ -0,0 +1,13 @@ +This is a Python implementation of the WHATWG Encoding standard. + +In order to be compatible with legacy web content when interpreting +something like Content-Type: text/html; charset=latin1, tools need +to use a particular set of aliases for encoding labels as well as +some overriding rules. For example, US-ASCII and iso-8859-1 on the +web are actually aliases for windows-1252, and an UTF-8 or UTF-16 +BOM takes precedence over any other encoding declaration. The +Encoding standard defines all such details so that implementations +do not have to reverse-engineer each other. + +This module has encoding labels and BOM detection, but the actual +implementation for encoders and decoders is Python's. diff --git a/textproc/py-webencodings/Makefile b/textproc/py-webencodings/Makefile new file mode 100644 index 00000000000..ac5de6882ec --- /dev/null +++ b/textproc/py-webencodings/Makefile @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2016/10/26 07:50:24 kleink Exp $ + +DISTNAME= webencodings-0.5 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= textproc www python +MASTER_SITES= ${MASTER_SITE_PYPI:=w/webencodings/} + +MAINTAINER= kleink@NetBSD.org +HOMEPAGE= https://pythonhosted.org/webencodings/ +COMMENT= Character encoding for the web +LICENSE= modified-bsd + +USE_LANGUAGES= # empty + +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/py-webencodings/PLIST b/textproc/py-webencodings/PLIST new file mode 100644 index 00000000000..aacf8d6be05 --- /dev/null +++ b/textproc/py-webencodings/PLIST @@ -0,0 +1,20 @@ +@comment $NetBSD: PLIST,v 1.1 2016/10/26 07:50:24 kleink Exp $ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/webencodings/__init__.py +${PYSITELIB}/webencodings/__init__.pyo +${PYSITELIB}/webencodings/__init__.pyc +${PYSITELIB}/webencodings/labels.py +${PYSITELIB}/webencodings/labels.pyo +${PYSITELIB}/webencodings/labels.pyc +${PYSITELIB}/webencodings/mklabels.py +${PYSITELIB}/webencodings/mklabels.pyo +${PYSITELIB}/webencodings/mklabels.pyc +${PYSITELIB}/webencodings/tests.py +${PYSITELIB}/webencodings/tests.pyo +${PYSITELIB}/webencodings/tests.pyc +${PYSITELIB}/webencodings/x_user_defined.py +${PYSITELIB}/webencodings/x_user_defined.pyo +${PYSITELIB}/webencodings/x_user_defined.pyc diff --git a/textproc/py-webencodings/distinfo b/textproc/py-webencodings/distinfo new file mode 100644 index 00000000000..5acec6ca1ee --- /dev/null +++ b/textproc/py-webencodings/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2016/10/26 07:50:24 kleink Exp $ + +SHA1 (webencodings-0.5.tar.gz) = ddfaad0b2ee2ba84dde81a6793c60934a4172f4d +RMD160 (webencodings-0.5.tar.gz) = 2d8beeb2b2506e9aa6a97410b5540a8070bf7a5b +SHA512 (webencodings-0.5.tar.gz) = 3f0c1995d23a8ccf8f0b02301edec5834336c27b7daf2335ded888073a1f13058acd93477cd020bb2b12d51b393d9b3166acf4995564cb9751ace8df35a891c2 +Size (webencodings-0.5.tar.gz) = 9479 bytes -- cgit v1.2.3