If I fill a Form with the following Code, special Caracters won't be transferred correctly:
def sendsms():
pr = options[predialstr.get()]
nr = handynumber.get()
txtc = smstext.get("1.0",END)
txt = txtc.strip()
br.set_handle_robots( False )
br.addheaders = [('User-agent', 'Firefox')]
br.open( "http://www.die-startseite.ch/Bern/" )
br.select_form( 'smsBooster' )
br.form[ 'intlPrefix' ] = [str(pr)]
br.form[ 'SMSEingabe' ] = str(nr)
br.form[ 'smsMessage' ] = txt #Error with special swiss Caracters..
br.submit()
resp = br.response()
print(resp)
messagebox.showinfo('Info', 'SMS mit dem Text %s wurde an %s versendet' % (txt, pr + nr))
delFields()
I already attached the Line with utf-8 on my Script:
-- coding: utf-8 --
But somehow it won't pass the Infos corectly to the webform.
Attached the whole Python-Code
free-sms.txt
If I fill a Form with the following Code, special Caracters won't be transferred correctly:
def sendsms():
pr = options[predialstr.get()]
nr = handynumber.get()
txtc = smstext.get("1.0",END)
txt = txtc.strip()
br.set_handle_robots( False )
br.addheaders = [('User-agent', 'Firefox')]
br.open( "http://www.die-startseite.ch/Bern/" )
br.select_form( 'smsBooster' )
br.form[ 'intlPrefix' ] = [str(pr)]
br.form[ 'SMSEingabe' ] = str(nr)
br.form[ 'smsMessage' ] = txt #Error with special swiss Caracters..
br.submit()
resp = br.response()
print(resp)
messagebox.showinfo('Info', 'SMS mit dem Text %s wurde an %s versendet' % (txt, pr + nr))
delFields()
I already attached the Line with utf-8 on my Script:
-- coding: utf-8 --
But somehow it won't pass the Infos corectly to the webform.
Attached the whole Python-Code
free-sms.txt