Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py

changeset 45
9a18f4dbb493
parent 15
f6ccc31d6e72
child 53
c3eb7cc1ff8b
diff -r fe5cd20cb0eb -r 9a18f4dbb493 Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Sun Jan 10 13:59:15 2010 +0000
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Sun Jan 10 19:19:52 2010 +0000
@@ -239,7 +239,7 @@
                     return
             
             try:
-                f=open(Utilities.toNativeSeparators(fname), "w")
+                f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8")
                 f.write(self.regexpLineEdit.text())
                 f.close()
             except IOError as err:
@@ -260,7 +260,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.regexpLineEdit.setText(regexp)
@@ -529,4 +529,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