Changeset 1151
- Timestamp:
- 07/27/07 23:55:38 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
umitCore/I18N.py (modified) (2 diffs)
-
umitGUI/NmapOutputViewer.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/umitCore/I18N.py
r1150 r1151 21 21 22 22 from umitCore.Logging import log 23 import codecs24 23 25 24 import locale … … 60 59 return string 61 60 62 def open(filename, mode):63 return codecs.open(filename, "r", ENC, "replace")64 65 def read_file(filename):66 fp = open(filename, "r")67 content = fp.read().encode("utf8", "replace")68 fp.close()69 print content[72:102]70 return content71 72 61 if __name__ == '__main__': 73 62 print _('UMIT - The nmap frontend') -
trunk/umitGUI/NmapOutputViewer.py
r1148 r1151 30 30 from higwidgets.higbuttons import HIGButton 31 31 32 from umitCore.I18N import _, read_file32 from umitCore.I18N import _, enc 33 33 from umitCore.Logging import log 34 34 from umitCore.UmitConf import NmapOutputHighlight … … 357 357 nmap_of = read_file(self.nmap_output_file) 358 358 359 self.text_buffer.set_text( nmap_of)359 self.text_buffer.set_text(enc(nmap_of.read())) 360 360 361 361 if __name__ == '__main__':
