I’m having issues with this as well.
In Supabase I have an edge function that returns the data I want, which includes many characters with diacritics. I have yet to find a way to get this data downloaded correctly.
I’ve tried two different edge functions, one returning just a JSON array of data:
return new Response(JSON.stringify(rows), {
status: 200,
headers: {
"Content-Type": "application/json; charset=utf-8",
...
and one returning CSV text:
const csv = stringify(rows);
const csvWithBOM = '\uFEFF' + csv;
return new Response(csvWithBOM, {
status: 200,
headers: {
"Content-Type": "text/csv; charset=utf-8",
"Content-Disposition": "attachment; filename=envelope_addresses.csv",
...
In each case, I use the “download data as csv” workflow action for the response.
With the JSON array edge function, no matter what I try to tweak on the supabase side, the resulting CSV file always has formatting issues with the diacritics (for this workflow action I just have the ‘Action.result’ in the ‘data’ formula). All the data is in the file, but its full of things like:
When I use the “download data as csv” workflow action with the csv format edge function, the data function for this step is, as described in the weweb docs,:
split(Action.result,',,')
But this results in a file with only a tiny piece of the data the function returned (I can see some of the missing data in the weweb log), there are only two rows (the header and one with four words of data), and everything is in one column (instead of over an expected 7 columns). That data seems, however, to be correctly respecting diacritics.
Anyone solved this issue or have a suggestion on what to try next?
Thanks!