HexEdit/HexEditSearchReplaceWidget.py

changeset 4687
f1d921533cc5
parent 4662
33e6bd4b1721
child 5389
9b1c800daff3
equal deleted inserted replaced
4686:5f8a5c568230 4687:f1d921533cc5
489 @param newFormat format to convert to 489 @param newFormat format to convert to
490 @type str 490 @type str
491 @return converted text 491 @return converted text
492 @rtype str 492 @rtype str
493 """ 493 """
494 if oldFormat and newFormat: 494 if txt and oldFormat and newFormat and oldFormat != newFormat:
495 # step 1: convert the text to a byte array using the old format 495 # step 1: convert the text to a byte array using the old format
496 byteArray = self.__text2bytearray(txt, oldFormat) 496 byteArray = self.__text2bytearray(txt, oldFormat)
497 497
498 # step 2: convert the byte array to text using the new format 498 # step 2: convert the byte array to text using the new format
499 txt = self.__bytearray2text(byteArray, newFormat) 499 txt = self.__bytearray2text(byteArray, newFormat)

eric ide

mercurial