Akzentproblem
Veröffentlicht: 14. Dez. 2017 - 09:51 Uhr
Hallo,
ich habe Probleme mit dem „é“ beim Umstellen meiner Windows 7-PCs von statischen IPs auf DHCP. Meine Batch-Datei läuft manuell einwandfrei, aber mit WAPT habe ich ein Kodierungsproblem. Ich habe also versucht, UTF-8 durch CP850 zu ersetzen:
# -*- 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')
Aber ich habe wieder mein Kodierungsproblem mit der Meldung:
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
Vielen Dank für Ihre Hilfe
ich habe Probleme mit dem „é“ beim Umstellen meiner Windows 7-PCs von statischen IPs auf DHCP. Meine Batch-Datei läuft manuell einwandfrei, aber mit WAPT habe ich ein Kodierungsproblem. Ich habe also versucht, UTF-8 durch CP850 zu ersetzen:
# -*- 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')
Aber ich habe wieder mein Kodierungsproblem mit der Meldung:
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
Vielen Dank für Ihre Hilfe