%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/encodings/ |
Current File : //usr/local/lib/python2.7/encodings/utf_8_sig.pyc |
ó Oêáac @ s› d Z d d l Z d d „ Z d d „ Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d „ Z d S( s Python 'utf-8-sig' Codec This work similar to UTF-8 with the following changes: * On encoding/writing a UTF-8 encoded BOM will be prepended/written as the first three bytes. * On decoding/reading if the first three bytes are a UTF-8 encoded BOM, these bytes will be skipped. iÿÿÿÿNt strictc C s' t j t j | | ƒ d t | ƒ f S( Ni ( t codecst BOM_UTF8t utf_8_encodet len( t inputt errors( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyt encode s c C sU d } | d t j k r, | d } d } n t j | | t ƒ \ } } | | | f S( Ni i ( R R t utf_8_decodet True( R R t prefixt outputt consumed( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyt decode s t IncrementalEncoderc B s; e Z d d „ Z e d „ Z d „ Z d „ Z d „ Z RS( R c C s t j j | | ƒ d | _ d S( Ni ( R R t __init__t first( t selfR ( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyR s c C sK | j r0 d | _ t j t j | | j ƒ d St j | | j ƒ d Sd S( Ni ( R R R R R ( R R t final( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyR s c C s t j j | ƒ d | _ d S( Ni ( R R t resetR ( R ( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyR % s c C s | j S( N( R ( R ( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyt getstate) s c C s | | _ d S( N( R ( R t state( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyt setstate, s ( t __name__t __module__R t FalseR R R R ( ( ( s/ /usr/local/lib/python2.7/encodings/utf_8_sig.pyR s t IncrementalDecoderc B s&