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

def khmerconverter v.1.4::modules::FontDataXML::FontData::__addToUniData (   self,
  unicode,
  legacy,
  data 
) [private]
put the unicode to legacy mapping in the right dict.
    data will get new dicts if needed 

Definition at line 357 of file FontDataXML.py.

                                                   :
        """ put the unicode to legacy mapping in the right dict.
            data will get new dicts if needed """
        l = len(unicode)
        # sanity check 
        if (l > 0 and l < MAXLENGTH):
            # make sure we have enough dict's    
            while (len(data) < l):
                data.append(dict())
            # insert into dict
            if (not data[l - 1].has_key(unicode)):
                data[l - 1][unicode] = legacy
            else:
                raise self.XMLDataError("Unicode string " + unicode + " already in datastructure.")


# testing


Generated by  Doxygen 1.6.0   Back to index