Skip to main content
Inspiring
February 4, 2023
Answered

Data exported from CSV flat file to SQL Server mis-encodes diacritical marks?

  • February 4, 2023
  • 1 reply
  • 305 views

Hello

I need to keep the accent marks in the SQL Server database.

My imported data (4000 + records) from a CSV in Excel contains hundreds of French diacriticals:

  • é –  (l'accent aigu)
  • à/è/ì/ò/ù – (l'accent grave)
  • â/ê/î/ô/û –  (l'accent circonflexe)
  • ç – (la cédille)
  • ë/ï/ü –  (l'accent tréma)

Each instance in the strings have changed to ? diamonds no matter what they were supposed to be. Is there a way to repair them after they have been imported or do I need to do this in the CSV file before the import, if possible?  What character encoding will SQL Server keep?

Thanks for any help with this.

    This topic has been closed for replies.
    Correct answer seasonedweb

    I will change the character encoding to UTF-8 when saving xlsx to CSV I think I solved the issue-

    Thanks for looking.

    1 reply

    seasonedwebAuthorCorrect answer
    Inspiring
    February 4, 2023

    I will change the character encoding to UTF-8 when saving xlsx to CSV I think I solved the issue-

    Thanks for looking.

    BKBK
    Community Expert
    Community Expert
    February 8, 2023

    UTF-8, that's the one! 🙂