Search code examples
mongodbmongoimport

mongoImport csv file accents are not detected


I use mongoimport to import data stored in a csv file. Data has accents, like "è". The command I run is the following:

mongoimport -d mountain -c diary --type csv --file diary.csv --headerline

when I check data with mongo shell, all the accents are replaced with a small square(I'm using windows command)

Consequently my angular application doesn't recognise those symbols, also if encoding is set to "utf-8".

How to solve the issue? Thanks


Solution

  • please check input file codepage. You can do it by opening file in application like notepad.

    mongoimport defaults to utf8