Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
How do I write special characters to csv file in node with fast-csv

I have a list that contains German characters and I write to csv file with fast-csv and gives me different characters.

import { writeToPath } from "fast-csv";

const data = [
  {
    "name": "Ästhetik Zahnarzt Hamburg City Z-24 Mö 17 / Dr. P. Michaelis, Dr. C. Khorram",
    "street_number": "Speersort 8",
    "zip_location": "20095 Hamburg, City Innenstadt",
    "phone": "040 34 45 44",
    "website": "http://www.z-24.de",
    "area": "Branche: Zahnärzte"
  }
]

writeToPath("tmp.csv", data, { headers: true })
  .on("error", (err) => console.error(err))
  .on("finish", () => console.log("Done writing."));

output is this: screenshot of output data

Ästhetik Zahnarzt Hamburg City Z-24 Mö 17 / Dr. P. Michaelis, Dr. C. Khorram | ... | Branche: Zahnärzte

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is the Excel issue with guessing a CSV encoding. Just indicate the option writeBOM equals to true, that way Excel can guess that the encoding is UTF-8.
The most reliable way is to write to XLSX-file directly to avoid such encoding issues.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!