dbwebb-se / python

Coursematerial for python
Other
34 stars 33 forks source link

Executing file with UTF-8 coding #20

Closed helikopterspark closed 8 years ago

helikopterspark commented 8 years ago

In example/cgi/executing-another-file.cgi, when executing a file containing Swedish characters the script fails on the student server. Adding encoding to open() makes it work, if changing exec(open(fullpath).read()) to: exec(open(fullpath, encoding='utf-8').read())

mosbth commented 8 years ago

Yep, seems like that. I'll fix it.