Exporting Contacts to CSV has junk on first line?
Posted by admin on Dec 5th, 2006
In Windows Mail under Vista, if I export contacts to a CSV file, the first line has 3 junk characters at the beginning. Everything else in the file looks normal. These 3 characters are the very first 3 characters. The line looks like this:Name,Email Address,Home Street,Home City...Any ideas on what these 3 characters are? Is this a bug in the export?Thanks, Mark beiley.com
Dec 8th, 2006 at 02:42 pm
"Mark Beiley" <googlegroups AT beiley.com> Possible encoding error. Language settings maybe? Check in that area.Not seeing it here.
Dec 13th, 2006 at 03:24 pm
Hi DGuess,Thanks for the help. My language settings seem okay in Control Panel / Regional. It is just plain English (US). I thought maybe one of my contacts was corrupted, so I moved them all out of the Contacts folder, and created a brand new one. Again I got 3 weird characters to start the CSV file. They are always the same 3 characters as shown below. I'm rather stumped...Thanks, Mark beiley.com "DGuess"
Dec 19th, 2006 at 02:10 am
Just sounds like it might be picking up something from one of the contacts but then, it's at the fields names.Post this question in the regular Windows Vista newsgroups as I think it's more the system than the files. Someone may have encountered this before. It reminds me of the old yb that was in the emails for Outlook Express and that was from an encoding issue which was easily solved.Like you, I'm stumped but it just makes me wonder if it might be something in the system itself. Explorer is basically where this is originating. "Mark Beiley" <googlegroups AT beiley.com>
Dec 23rd, 2006 at 04:50 pm
Are you using a Unicode application (and in your case specifically UTF8) to read the CSV? Even if you are windows has to guess if a file is Unicode or ansi and sometimes guesses wrong. Throwing those three characters into notepad and saving as ANSI then reopening the file and looking File Save As will show it is UTF8 (easier than searching for the standard to read it)."DGuess"
Dec 24th, 2006 at 08:38 pm
I think this is somehow the problem... I was reading it with Excel and also with an ANSI text editor (www.boxersoftware.com). Both of these showed those 3 junk characters at the beginning. If I open the CSV file with Notepad, when I click on the file in the "Open" dialog, it changes the encoding automatically to "UTF8". If I open it with the UTF8 encoding, the file looks normal. If I open it with "ANSI" encoding, I see those 3 junk characters. I guess Windows Mail is exporting the CSV file with UTF8 encoding. I'm not sure what that is, but at least now I understand (sort of...).Thanks, Mark beiley.com<.>
Dec 26th, 2006 at 11:40 am
ANSI has 256 characters, not enough for all languages in the world. Unicode has lots more (there are different versions). In English UTF8 and ANSI are the same. Other characters not commonly used in english are two characters in UTF8 (all characters are two in other unicode types ie 16 bit rather than 8 bit there is also a 32 bit unicode). So an english UTF8 file is likely identical to an ANSI file except all unicode files start with a header saying what flavour of unicode it is.I only have Excel 95 installed. On the wizard for opening text files (same page as choosing fixed width fields or delimited) I get to choose various formats (though this is too old for unicode to be a choice).Also different divisions of MS use different unicode formats just to make sure it can't work seemlessly."Mark Beiley" <googlegroups AT beiley.com>
Dec 27th, 2006 at 11:51 pm
I learned what those 3 "junk" characters are. They are the "Byte Order Mask", as you've mentioned. I found a good article that explained this in more detail:codesnipers.com/?q=node/68 Thanks, Mark beiley.com <.>