httpresponse = httpopen(BASE_URL + '/templates/account/accountActivityListDownload.cfm?AccNum='+cptnum+'&viewMode=CSV&orderBy=TRANSACTION_DATE_DESCENDING&page=1&startDate='+startdate+'&endDate='+enddate+'&startAmount=0&endAmount=999999999999&initialPaginationLoad=true&screenSize=big&showBalance=true')
# httpresponse = httpopen(BASE_URL + '/templates/account/accountActivityListDownload.cfm?AccNum='+cptnum+'&viewMode=CSV&orderBy=TRANSACTION_DATE_DESCENDING&page=1&startDate='+startdate+'&endDate='+enddate+'&startAmount=0&endAmount=999999999999&initialPaginationLoad=true&screenSize=big&showBalance=true&hiddenFormId=00000000-0000-0000-0000-000000000000') # hiddenFormId is javascript created random UUID
- # logging.debug(httpresponse.info())
- csvdata = httpresponse.read().decode('utf-8')
+ #logging.debug(httpresponse.info()) # Reports Content-Type: application/csv;charset=windows-1252
+ csvdata = httpresponse.read().decode('windows-1252')
if len(csvdata) == 0:
logging.info('No mouvement for %s', title)
continue