Question

I have an Access 2003 database. A table has a Memo field and I'm having issues with getting that data out.

  • Exporting that field to a txt or csv chops that field off (255 characters)
  • Exporting as Excel gives me strange characters for linebreaks
  • Appending to a mysql database via myODBC gives an error about "incorrect string"
  • Using VBA with Scripting.FileSystemObject doesn't work unless you tell it to create the file as Unicode, which is okay, but then I can't get the file converted to something I can import

There are Unicode characters in some of my data. It's not a multi-linual database, so the only ones I can find are slanted quotes, probably copied in from Word. Dropping them is fine; the information in the fields will still be understandable.

Can I convert these Unicode characters to their (ANSI? ASCII?) equivalents? I've not dealt with encodings very much.

I tried playing around with iconv, but without knowing anything about the encoding, it didn't really help.

Right now, I need help on: - converting the characters in my database so they export non-unicode-ish-ly - OR, converting the unicode characters after the file has been exporting.

Was it helpful?

Solution

The file created by Access/VBA is UTF-16. For some reason, there is a character at the beginning of the file that was causing the Ruby YAML library to parse wrongly.

iconv to the rescue!

iconv -f UTF-16 -t ASCII -c utf_file.yml > ascii_file.yml

OTHER TIPS

How are you exporting? Have defined an export spec? In Access 2003, this gives you a dropdown list with all the usual encodings (code pages), including Unicode UTF8. This is also how you define your memo field as having a length greater than 255 characters.

Export to .xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top