Accent problem
Published: Dec 14, 2017 - 09:51
Hello,
I'm having trouble with the "é" when trying to switch my Windows 7 PCs from static IPs to DHCP. My batch file runs fine manually, but I'm having an encoding issue with WAPT. So I tried replacing utf-8 with cp850:
# -*- coding: cp850 -*-
from setuphelpers import *
uninstallkey = []
def install():
print("Updating IP interfaces")
run (r'reg import DHCP-CLIENT.reg')
run (u'netsh interface ip set dns "Local network connection" dhcp')
run (u'netsh interface ip set address "Local network connection" dhcp')
but I'm back to my encoding problem with the message:
Updating IP interfaces
'ascii' codec can't encode characters in position 42-44: ordinal not in range(128) : faulty string is 'u'netsh interface ip set dns "Connection "on local network" dhcp
Thank you for your help
I'm having trouble with the "é" when trying to switch my Windows 7 PCs from static IPs to DHCP. My batch file runs fine manually, but I'm having an encoding issue with WAPT. So I tried replacing utf-8 with cp850:
# -*- coding: cp850 -*-
from setuphelpers import *
uninstallkey = []
def install():
print("Updating IP interfaces")
run (r'reg import DHCP-CLIENT.reg')
run (u'netsh interface ip set dns "Local network connection" dhcp')
run (u'netsh interface ip set address "Local network connection" dhcp')
but I'm back to my encoding problem with the message:
Updating IP interfaces
'ascii' codec can't encode characters in position 42-44: ordinal not in range(128) : faulty string is 'u'netsh interface ip set dns "Connection "on local network" dhcp
Thank you for your help