Bad characters in csv top row.

I need to import data from a csv file into Access 2000. However, the top row of the csv has bad characters in it (see attached). Maybe some kind of encoding? Anyone know of a way to convert or strip out those characters maybe with a batch file before importing? (Can't use an import specification to define the column names)
Untitled-1.jpg
LVL 1
machine_runAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nick67Commented:
Well,

In your previous question, we talked about TextStream and ReadLine
http://www.experts-exchange.com/questions/28756519/How-to-check-csv-header-before-Access-2000-import.html#a41078622
There's the other end of it, too.  You can write files.

Dim fs As Object
Dim BatFile As TextStream
Set fs = CreateObject("Scripting.FileSystemObject")
Set BatFile = fs.CreateTextFile("c:\SomeVeryNicePlace\MyCleanedUpFile.csv", True)


Now that it's opened you can start writing to it
BatFile.WriteLine ("<html>")
BatFile.WriteLine ("<Body>")
BatFile.WriteLine ("Hello World")
BatFile.WriteLine ("</Body>")
BatFile.WriteLine ("</html>")
BatFile.Close
Set BatFile = Nothing


Now, that example is not quite what you want
You'll want to WriteLine an nice comma-delimited header row
Then ReadLine the first bad row from your source file and do nothing
And then you want the Do While Loop from the previous question
You'll ReadLine each successive row from the source file to a variable and WriteLine it to the new file.
Fairly neat.

I use the technique to write html and batchfiles.
Any textfile you need can be written this way.
Bill PrewIT / Software Engineering ConsultantCommented:
For a test, try this at a command prompt, and then try to import the result file.

type filein.csv > fileout.csv

~bp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
What do you see if you open the file using a hex editor?
Carlos IjalbaIT Systems DirectorCommented:
To easily strip off "weird" characters, the quickest method is to open the CSV file with windows Notepad, and save it again specifying character code as UTF-8.

After that, you can import in in excel or access without weird characters appearing.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.