OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, source, override_encoding=None, transport_encoding=None, same_origin_parent_encoding=None, likely_encoding=None, default_encoding="windows-1252", useChardet=True) |
def | reset (self) |
def | openStream (self, source) |
def | determineEncoding (self, chardet=True) |
def | changeEncoding (self, newEncoding) |
def | detectBOM (self) |
def | detectEncodingMeta (self) |
![]() | |
def | __init__ (self, source) |
def | position (self) |
def | char (self) |
def | readChunk (self, chunkSize=None) |
def | characterErrorsUCS4 (self, data) |
def | characterErrorsUCS2 (self, data) |
def | charsUntil (self, characters, opposite=False) |
def | unget (self, char) |
Provides a unicode stream of characters to the HTMLTokenizer. This class takes care of character encoding and removing or replacing incorrect byte-sequences and also provides column and line tracking.
def __init__ | ( | self, | |
source, | |||
override_encoding = None , |
|||
transport_encoding = None , |
|||
same_origin_parent_encoding = None , |
|||
likely_encoding = None , |
|||
default_encoding = "windows-1252" , |
|||
useChardet = True |
|||
) |
Initialises the HTMLInputStream. HTMLInputStream(source, [encoding]) -> Normalized stream from source for use by html5lib. source can be either a file-object, local filename or a string. The optional encoding parameter must be a string that indicates the encoding. If specified, that encoding will be used, regardless of any BOM or later declaration (such as in a meta element)
def changeEncoding | ( | self, | |
newEncoding | |||
) |
def detectBOM | ( | self | ) |
Attempts to detect at BOM at the start of the stream. If an encoding can be determined from the BOM return the name of the encoding otherwise return None
def detectEncodingMeta | ( | self | ) |
Report the encoding declared by the meta element
def determineEncoding | ( | self, | |
chardet = True |
|||
) |
def openStream | ( | self, | |
source | |||
) |
Produces a file object from source. source can be either a file object, local filename or a string.
Reimplemented from HTMLUnicodeInputStream.
def reset | ( | self | ) |
Reimplemented from HTMLUnicodeInputStream.
charEncoding |
dataStream |
default_encoding |
likely_encoding |
numBytesChardet |
numBytesMeta |
override_encoding |
rawStream |
same_origin_parent_encoding |
transport_encoding |