'Convert a string from the input_codec to the output_codec.'

def convert(self, s):

    if (self.input_codec != self.output_codec):
        return unicode(s, self.input_codec).encode(self.output_codec)
    else:
        return s
