outlook.com contacts export is corrupted

I recently assisted a Gmail user at https://support.google.com/mail/thread/72581338 who was attempting to export contacts data from outlook.com and import it to his gmail.com account.  I found that his problem was due to three odd bytes at the beginning of the CSV file created by outlook.com.

I confirmed that an export file from my own account created the same problem.

using a Windows Powershell command that reveals some hidden characters at the beginning of the file.

PS C:\Users\Keith\downloads> cat -encoding byte .\contacts_outlook_orig.csv

239

187

191

70

105

114

115

116

32

78

97

109

101

44

...

These numbers are the character numbers for the first fourteen characters in the file.  They correspond to characters:

239 187 191 70 105 114 115 116 32 78 97 101 101 44
ï » ¿ F i r s t N a m e ,

i.e. the name of the first column in the CSV file.  Because Google Contacts Export doesn't understand the column name "First Name", it writes that data into the Notes field with the column name followed by the column data.  Because "" are not in the normal range of printable characters they are appear to be omitted from the saved data.

A similar file exported from Google Contacts, shows:

PS C:\Users\Keith\downloads> cat -encoding byte .\contacts_ex_outlook_KR.csv

70

105

114

115

116

32

78

97

109

101

44

or:

70 105 114 115 116 32 78 97 101 101 44
F i r s t N a m e ,
It appears that outlook.com is inserting three characters at the beginning of the file that cannot be seen by a text editor or by Excel and that these interfere with the Gmail import.

It is not appropriate for these characters to be there in a CSV file.  Is there a fix for this?
Hi Keith,

I'm not seeing that with an export I just did - it imported into my gmail account fine.

Open the file in notepad - what is the encoding type in the lower right? I had a client last week who had UTF-16 encoding and it would not import (into a different web app) until we resaved it with UTF-8 encoding.
--
Diane Poremsky
M365 MVP, specializing in Outlook, Exchange, and Microsoft 365 apps.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

My file, like yours, shows UTF-8 with BOM and this is exactly the problem.  Per https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom:

The UTF-8 BOM is a sequence of bytes at the start of a text stream ( 0xEF, 0xBB, 0xBF ) that allows the reader to more reliably guess a file as being encoded in UTF-8. Normally, the BOM is used to signal the endianness of an encoding, but since endianness is irrelevant to UTF-8, the BOM is unnecessary

Not only is it unnecessary, but it causes misreading.  The average user doesn't have access to utilities that alter encoding.

Verified today that this is still the way outlook.com works and that Gmail still fails to correctly interpret the first column.

Note that this is a recent change in outlook.com, the user I helped mentioned that it worked as expected as recently as 8 September.  It doesn't happen in export files from Outlook 2013 (encoded as UTF-8).

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I exported that file tonight and imported it into Gmail - it worked perfectly.
--
Diane Poremsky
M365 MVP, specializing in Outlook, Exchange, and Microsoft 365 apps.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Is your Gmail a gmail.com or a Google Workspace account?

Would you like to try this file (only two contacts)?

https://drive.google.com/file/d/17GVgmcOCZd1auO7WYUn5Ui8i4G73CpD3/view?usp=sharing

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Please confirm you are using outlook.com, not Outlook desktop software.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I tested in gmail but also have a gsuite account - will try that too.

The sample imported fine -

Something is apparently messing with the import. What do you use for antivirus? (I use Defender.)
--
Diane Poremsky
M365 MVP, specializing in Outlook, Exchange, and Microsoft 365 apps.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

The file did not import correctly for you.  The First Name column is missing in just the way I described.  The contacts are only showing the Last Name.  If you open the upper contact to view the full information, you will see that the Notes field contains "First Name: First".

You are reproducing exactly the problem I am reporting.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Ah... I missed that - for some reason, I thought it was importing the odd characters and looked for that.

I resaved the file as UTF-8 and the first names imported properly.
--
Diane Poremsky
M365 MVP, specializing in Outlook, Exchange, and Microsoft 365 apps.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 10, 2023 Views 325 Applies to: