I am using a simple python script to get reservation results for my CID :
simple.py
:
data = {"minorRev":"current minorRev #","cid":"xxx","apiKey":"xxx","customerIpAddress":" ","creationDateStart":"03/31/2013","}
url = 'http://someservice/services/rs/'
req = requests.get(url,params=data)
print req
print req.text
print req.status_code
Now on the command prompt if I do python simple.py
it runs perfectly and prints the req.text
variable
However when I try to do
python simple.py | grep pattern
I get
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 1314: ordinal not in range(128)