Hi Nick,
Does fn:unparsed-text() not work for you for fetching the remote resource?
Are you using BaseX, which I gather from your use of the csv:parse() function? Depending on your implementation of the EXPath HTTP Client, the send-request() function may present text files to you in implementation-specific ways. This seems to be one area in which, for example, eXist and BaseX's implementations differ. Here's the BaseX code for retrieving the CSV file:
```
<http:request href="{$url}" method="GET">
<http:header name="Connection" value="close"/>
</http:request>
let $response := http:send-request($request)
return
$response[2]
```
This returns the CSV file as plain text.
In eXist, you have to pass this $response[2] to util:binary-to-string() to achieve the same result.
However, both BaseX and eXist return identical plain text results when using fn:unparsed-text():
```
```
Joe