abc @ s6 d Z d d l m Z d d l Z d d l m Z d Z i d d 6d d
6d d 6d
d 6Z i Z d Z d Z
d Z d e f d YZ
e
d Z e
d Z e
d Z d d Z d Z e d d Z d d Z d Z e d d Z d Z d e f d! YZ d" e f d# YZ d S($ u
webencodings
~~~~~~~~~~~~
This is a Python implementation of the `WHATWG Encoding standard
`. See README for details.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
i( t unicode_literalsNi ( t LABELSu 0.5u
iso-8859-8u iso-8859-8-iu mac-cyrillicu x-mac-cyrillicu mac-romanu macintoshu cp874u windows-874c C s | j d j j d S( u9 Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.
:param string: An Unicode string.
:returns: A new Unicode string.
This is used for `ASCII case-insensitive
`_
matching of encoding labels.
The same matching is also used, among other things,
for `CSS keywords `_.
This is different from the :meth:`~py:str.lower` method of Unicode strings
which also affect non-ASCII characters,
sometimes mapping them into the ASCII range:
>>> keyword = u'Bac\N{KELVIN SIGN}ground'
>>> assert keyword.lower() == u'background'
>>> assert ascii_lower(keyword) != keyword.lower()
>>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground'
u utf8( t encodet lowert decode( t string( ( sE /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt ascii_lower# s c C s t | j d } t j | } | d k r4 d St j | } | d k r | d k rn d d l m } n! t j | | } t j
| } t | | } | t |