ok
Direktori : /proc/self/root/lib/python2.7/site-packages/chardet/ |
Current File : //proc/self/root/lib/python2.7/site-packages/chardet/universaldetector.pyc |
� j�Rc @ s� d d l m Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l Z d Z d Z d Z d Z d d d � � YZ d S( i ( t constantsi����N( t Latin1Prober( t MBCSGroupProber( t SBCSGroupProber( t EscCharSetProberg�������?i i t UniversalDetectorc B s, e Z d � Z d � Z d � Z d � Z RS( c C sD t j d � | _ t j d � | _ d | _ g | _ | j � d S( Ns [�-�]s (|~{)( t ret compilet _highBitDetectort _escDetectort Nonet _mEscCharSetProbert _mCharSetProberst reset( t self( ( s= /usr/lib/python2.7/site-packages/chardet/universaldetector.pyt __init__- s c C s i d d 6d d 6| _ t | _ t | _ t | _ t | _ d | _ | j r] | j j � n x | j D] } | j � qg Wd S( Nt encodingg t confidencet ( R t resultt Falset donet Truet _mStartt _mGotDatat ePureAsciit _mInputStatet _mLastCharR R R ( R t prober( ( s= /usr/lib/python2.7/site-packages/chardet/universaldetector.pyR 4 s c C s | j r d St | � } | s# d S| j sd| d t j k rY i d d 6d d 6| _ qd| d t j k r� i d d 6d d 6| _ qd| d t j k r� i d d 6d d 6| _ qd| d d k r� i d d 6d d 6| _ qd| d d k ri d d 6d d 6| _ qd| d t j k r4i d d 6d d 6| _ qd| d t j k rdi d d 6d d 6| _ qdn t | _ | j d r�| j d d k r�t | _ d S| j t k r�| j j | � r�t | _ q�| j t k r�| j j | j | � r�t | _ q�n | d | _ | j t k r�| j s2t � | _ n | j j | � t j k ri | j j � d 6| j j � d 6| _ t | _ qn� | j t k r| j s�t � t � t � g | _ n x\ | j D]N } | j | � t j k r�i | j � d 6| j � d 6| _ t | _ Pq�q�Wn d S( Ni s UTF-8R g �?R i s UTF-32LEs UTF-32BEs �� s X-ISO-10646-UCS-4-3412t ��s X-ISO-10646-UCS-4-2143i s UTF-16LEs UTF-16BEg i����( R t lenR t codecst BOMR t BOM_UTF32_LEt BOM_UTF32_BEt BOM_LEt BOM_BER R R R t searcht eHighbyteR R t eEscAsciiR R t feedR t eFoundItt get_charset_namet get_confidenceR R R R ( R t aBuft aLenR ( ( s= /usr/lib/python2.7/site-packages/chardet/universaldetector.pyR( @ sh c C s� | j r d S| j s6 t j r2 t j j d � n d St | _ | j t k rl i d d 6d d 6| _ | j S| j t k rd } d } d } xD | j D]9 } | s� q� n | j � } | | k r� | } | } q� q� W| r| t k ri | j � d 6| j � d 6| _ | j Sn t j r|t j j d � xM | j d j D]8 } | sOq=n t j j d | j � | j � f � q=Wn d S( Ns no data received! t asciiR g �?R g s"