I'm trying to execute a .vbs script from my python script using os.system()
.
It's like this
# -*-coding:utf-8 -*-
import os
os.system('cscript myVbsScript.vbs -i "This is a test" "1000" "æøå"')
"æøå" is not passed correctly.
When using:
os.system(u'cscript myVbsScript.vbs -i "This is a test" "1000" "æøå"')
I get the error:
os.system(u'cscript myVbsScript.vbs 10000 "This is a test" "1000" "æøå"')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 55-57: ordinal not in range(128)`
When I'm not trying to use "æøå" in os.system
then it works like a charm - so I am afraid that the problem is with os.system
.
Any idea how to fix the problem?