Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

289
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda