导出MS Access Memo字段并转换Unicode [英] Export MS Access Memo field and convert Unicode

查看:159
本文介绍了导出MS Access Memo字段并转换Unicode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Access 2003数据库。一张表有一个备注字段,我有把数据出来的问题。




  • 将该字段导出为txt或csv,字段关闭(255个字符)

  • 导出为Excel给我的奇怪的字符换行符

  • 通过myODBC附加到一个mysql数据库提供了一个错误字符串

  • 使用VBA与Scripting.FileSystemObject不起作用,除非你告诉它创建文件为Unicode,这是可以的,但是我不能得到文件转换成某事我可以导入



我的一些数据中有Unicode字符。它不是一个多线程数据库,所以我可以找到的只有倾斜的引号,可能从Word复制。丢掉它们是好的这些字段中的信息仍然是可以理解的。



我可以将这些Unicode字符转换为它们的(ANSI?ASCII?)等价物吗?我没有很好地处理编码。



我试图用iconv玩,但是不知道编码的什么,它没有真正的帮助。



现在,我需要帮助:
- 转换数据库中的字符,以便导出non-unicode-ish-ly
- OR,在文件导出后转换unicode字符。 / p>

解决方案

由Access / VBA创建的文件是UTF-16。由于某种原因,文件开头有一个字符导致Ruby YAML库错误解析。



iconv 救援!

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


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.

解决方案

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

这篇关于导出MS Access Memo字段并转换Unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆