What would be the best way or a simple and good way to encode string data in python for later reading in php?
Failed examples:
1: In Python:
>>> encoded = u'test ö'.encode('utf-8')
'text \xc3\xb6'
In PHP:
>>> $decoded = utf8_decode('test \xc3\xb6');
test \xc3\xb6
???
2: In Python:
>>> encoded = u'test ö'.encode('latin-1')
'test \xf6'
In PHP:
$decoded = ???;