Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

300
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda