Skip to content

Commit f21562c

Browse files
committed
[pyqgis-console] fixes #9097 (thanks to Minoru Akagi)
1 parent dcfccbc commit f21562c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/console/console_editor.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ def runScriptCode(self):
581581
tmpFile = self.createTempFile()
582582
filename = tmpFile
583583

584-
self.parent.pc.shell.runCommand(u"execfile(r'{0}')".format(filename))
584+
self.parent.pc.shell.runCommand(u"execfile(u'{0}'.encode('{1}'))"
585+
.format(filename.replace("\\", "/"), sys.getfilesystemencoding()))
585586

586587
def runSelectedCode(self):
587588
cmd = self.selectedText()

0 commit comments

Comments
 (0)