How to fix the issues while importing a .csv file to a DB in MSSQL using Azure Data Studio in MAC

Lalitha Maruthachalam 20 Reputation points
2025-08-14T16:53:39.01+00:00

I tried to import the following .csv file using the import flat file wizard in Azure data studio. I have pasted a snapshot of it below. If I try to import it using Azure data studio the column 3 in row 2,3, 5, 13 and column 1 in rows 7, 8 are having '?' in the table after import.

Screenshot 2025-08-14 at 10.06.49 PM

Screenshot 2025-08-14 at 10.16.23 PM

User's image

User's image

Can you please let me know how to fix this?

Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
{count} votes

Answer accepted by question author
  1. Mahesh Kurva 9,800 Reputation points Microsoft External Staff Moderator
    2025-08-14T19:21:39.2633333+00:00

    Hi Lalitha Maruthachalam

    Greetings!!

    Steps to Fix Special Character Issues When Importing CSV into Azure Data Studio on macOS:

    1.Check and Convert the Encoding of Your CSV File

    • Open your .csv file in a text editor like VS Code.
    • Look at the bottom-right corner to check the current encoding (e.g., Windows 1252, MacRoman, etc.).
    • If it's not UTF-8, convert it:
    • Go to File → Save with Encoding → UTF-8.

    2.Save the File as UTF-8 Without BOM

    • When saving, choose UTF-8 without BOM.
    • This ensures that special characters (e.g., é, ü, ñ) are preserved correctly and prevents any hidden byte order marks that might interfere with import.

    3.Re-import the File Using Azure Data Studio

    • Open Azure Data Studio.
    • Use the Import Flat File Wizard to load the newly saved UTF-8 file.
    • Special characters should now be imported correctly without showing as ?.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.