Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py

changeset 45
9a18f4dbb493
parent 15
f6ccc31d6e72
child 96
9624a110667d
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Sun Jan 10 13:59:15 2010 +0000
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Sun Jan 10 19:19:52 2010 +0000
@@ -322,7 +322,7 @@
                     return
             
             try:
-                f=open(Utilities.toNativeSeparators(fname), "w")
+                f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8")
                 f.write(self.regexpTextEdit.toPlainText())
                 f.close()
             except IOError as err:
@@ -343,7 +343,7 @@
             self.trUtf8("RegExp Files (*.rx);;All Files (*)"))
         if fname:
             try:
-                f=open(Utilities.toNativeSeparators(fname), "r")
+                f=open(Utilities.toNativeSeparators(fname), "r", encoding = "utf-8")
                 regexp = f.read()
                 f.close()
                 self.regexpTextEdit.setPlainText(regexp)
@@ -678,4 +678,4 @@
         self.resize(size)
         
         self.connect(self.cw.buttonBox, SIGNAL("accepted()"), self.close)
-        self.connect(self.cw.buttonBox, SIGNAL("rejected()"), self.close)
\ No newline at end of file
+        self.connect(self.cw.buttonBox, SIGNAL("rejected()"), self.close)

eric ide

mercurial