Back to index

plone3  3.1.7
Functions | Variables
convert_to_utf-8 Namespace Reference

Functions

def convert

Variables

list infilename = sys.argv[1]
list outfilename = sys.argv[2]
string encoding = 'ISO-8859-1'
tuple fpi = open(infilename)
tuple data = fpi.read()
tuple utfdata = convert(data, encoding)
tuple fpo = open(outfilename, 'wb')

Function Documentation

def convert_to_utf-8.convert (   data,
  encoding = 'ISO-8859-1' 
)

Definition at line 5 of file convert_to_utf-8.py.

00005 
00006 def convert(data, encoding='ISO-8859-1'):
00007     data = unicode(data, encoding)
00008     data = data.encode('UTF-8')
00009     return data

Here is the caller graph for this function:


Variable Documentation

tuple convert_to_utf-8.data = fpi.read()

Definition at line 20 of file convert_to_utf-8.py.

list convert_to_utf-8.encoding = 'ISO-8859-1'

Definition at line 15 of file convert_to_utf-8.py.

tuple convert_to_utf-8.fpi = open(infilename)

Definition at line 18 of file convert_to_utf-8.py.

tuple convert_to_utf-8.fpo = open(outfilename, 'wb')

Definition at line 24 of file convert_to_utf-8.py.

list convert_to_utf-8.infilename = sys.argv[1]

Definition at line 13 of file convert_to_utf-8.py.

list convert_to_utf-8.outfilename = sys.argv[2]

Definition at line 14 of file convert_to_utf-8.py.

tuple convert_to_utf-8.utfdata = convert(data, encoding)

Definition at line 23 of file convert_to_utf-8.py.