Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing a Unicode file (UTF-8)

Status
Not open for further replies.

glthornton

Programmer
Oct 19, 2005
108
US
I have been trying to import a Unicode file into an Access 2003 database via VBA code with no luck. I tried using the OpenTextStream to read the data but can't seem to get that to work. The files are fixed width but are UTF-8 format. Please any proven fix would be greatly appreciated.
 
Thank you PHV for your response, but it just doesn't seem to work. Look at the attachment link so you can see the type of results I am getting.

Would greatly appreciate any other thoughts or ideas.

Kind regards,
glthornton
 
 http://www.driveway.com/u1m2l7s1o8
What happens if you use TriStateFalse instead ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I get data that I can read, but the problem is its UTF-8 so not all the field have unicode values. So when it loads into the table its a fixed width file and once it hits a unicode character is shifts everything and then stops loading the records. When I change it to TristateFalse, does that mean that file is ASCII?
 
glthornton,
Can you create a working import specification using the Link/Import text wizard?

If you invoke the wizard, then click Advanced..., you should be able to change the Code Page to '[tt]Unicode (UTF-8)[/tt]' which should allow you to create the specification as you would for a normal ASCII file.

One the import specification is created you should be able to use it as an argument for [tt]TransferText[/tt] or as part of a direct file query.

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top