0

I use 'use_bom' => true to read Japanese in CSV files when opening with Excel. I call through postman everything is fine, but when I call the API via FE, I get a Japanese font error.

I tried changing the content-type content-encode in the header, but it doesn't seem to work.

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
RacoonT
  • 31
  • 5

1 Answers1

1

I tried searching with the keyword "bomb csv" and I did the following

  • before

    href={data:text/csv;charset=utf-8,${encodeURIComponent(dataCSV,)}}

  • after

    href={data:text/csv;charset=utf-8,${encodeURIComponent('\uFEFF' + dataCSV,)}}

so the returned csv file does not have font errors anymore. I don't understand why but glad I fixed it anyway

RacoonT
  • 31
  • 5