I have a simple urlencode to push data from my python to my php file.
# -*- coding: utf-8 -*-
import urllib,urllib2
array={'test':'Ch\xe2teau'}
test=urllib2.urlopen(urllib2.Request('http://localhost/link/php.php',urllib.urlencode(array,True))).read()
print test
The array is utf-8 encoded. I am trying to pass to to my php file for use but it turns into a ?
Here is my result:
How can I prevent this data loss?