Logo Search packages:      
Sourcecode: khmerconverter version File versions  Download package

def khmerconverter v.1.4::modules::FontDataXML::FontData::changeEncoding (   self,
  sin,
  encoding 
)
if encoding is in encodingData but not cp1252,
    change encoding to cp1252 if
    return sin 

Definition at line 158 of file FontDataXML.py.

                                           :
        """if encoding is in encodingData but not cp1252,
            change encoding to cp1252 if
            return sin """
        if (self.canDecode(encoding) and encoding != 'cp1252'):
            try:                
                sin = sin.decode(encoding)
                sin = sin.encode('cp1252')
            except UnicodeEncodeError:
                    raise TypeError("Codecs Error")
        return sin
        

Generated by  Doxygen 1.6.0   Back to index