Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
BeautifulSoup.UnicodeDammit Class Reference

List of all members.

Public Member Functions

def __init__
def find_codec

Public Attributes

 markup
 originalEncoding
 smartQuotesTo
 triedEncodings
 unicode

Static Public Attributes

dictionary CHARSET_ALIASES
 EBCDIC_TO_ASCII_MAP = None
dictionary MS_CHARS

Private Member Functions

def _codec
def _convertFrom
def _detectEncoding
def _ebcdic_to_ascii
def _subMSChar
def _toUnicode

Detailed Description

A class for detecting the encoding of a *ML document and
converting it to a Unicode string. If the source encoding is
windows-1252, can replace MS smart quotes with their HTML or XML
equivalents.

Definition at line 1512 of file BeautifulSoup.py.


Constructor & Destructor Documentation

def BeautifulSoup.UnicodeDammit.__init__ (   self,
  markup,
  overrideEncodings = [],
  smartQuotesTo = 'xml' 
)

Definition at line 1525 of file BeautifulSoup.py.


Member Function Documentation

def BeautifulSoup.UnicodeDammit._codec (   self,
  charset 
) [private]

Definition at line 1691 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit._convertFrom (   self,
  proposed 
) [private]

Definition at line 1568 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit._detectEncoding (   self,
  xml_data 
) [private]
Given a document, tries to detect its XML encoding.

Definition at line 1621 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit._ebcdic_to_ascii (   self,
  s 
) [private]

Definition at line 1702 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit._subMSChar (   self,
  orig 
) [private]
Changes a MS smart quote character to an XML or HTML
entity.

Definition at line 1557 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit._toUnicode (   self,
  data,
  encoding 
) [private]
Given a string and its encoding, decodes the string into Unicode.
%encoding is a string recognized by encodings.aliases

Definition at line 1596 of file BeautifulSoup.py.

def BeautifulSoup.UnicodeDammit.find_codec (   self,
  charset 
)

Definition at line 1685 of file BeautifulSoup.py.


Member Data Documentation

Initial value:
{ "macintosh" : "mac-roman",
                        "x-sjis" : "shift-jis" }

Definition at line 1522 of file BeautifulSoup.py.

Definition at line 1701 of file BeautifulSoup.py.

Definition at line 1568 of file BeautifulSoup.py.

Definition at line 1727 of file BeautifulSoup.py.

Definition at line 1525 of file BeautifulSoup.py.

Definition at line 1525 of file BeautifulSoup.py.

Definition at line 1525 of file BeautifulSoup.py.

Definition at line 1525 of file BeautifulSoup.py.


The documentation for this class was generated from the following file:


websocket_gui
Author(s): Benoit Lescot and Stéphane Magnenat
autogenerated on Mon Oct 6 2014 08:54:48