将 Microsoft Access 表导出为 UTF-16 CSV
我有一个包含一些中文字符的 Access 表,我需要将其导出到使用 UTF-16 编码的 CSV 文件中。如果这是不可能的,我还可以尝试将表导出到 XLS 或 CSV 文件,然后将编码转换为 UTF-16。
我有一种感觉,使用 Access 和/或 Excel 和/或 VBA 没有简单的方法可以做到这一点,但如果有的话,我很想听听!如果没有,使用 Java 的解决方案会很有帮助。
我确信,如果我知道该文件已经采用的编码方式,将会很有帮助。当我将文件导出到 Microsoft Excel 2000 时,中文字符可以正确显示,但在 Microsoft Access 中却不能正确显示。它们最初被输入到 Microsoft Excel 中。我认为这意味着它们是 Unicode 富文本格式,但我不确定。
非常感谢!
I have an Access table with some Chinese characters that I need to export into a CSV file with UTF-16 encoding. If this is not possible, I could also try exporting the table into an XLS or CSV file, and then convert the encoding to UTF-16.
I have a feeling there is no simple way of doing this using Access and/or Excel and/or VBA, but if there is, I would love to hear it! If not, a solution using Java would be helpful.
I'm sure it would be helpful if I knew what encoding the file was already in. The Chinese characters show up correctly when I export the file to Microsoft Excel 2000, but they do not show up correctly in Microsoft Access. They were originally typed into Microsoft Excel. I think that means they are in Unicode rich text, but I'm not sure.
Thanks much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用 ADO 流来做这类事情。我必须为大量网站执行此操作,我正在帮助他们实现 SEO 自动化。
http://www.nonhostile.com/howto-convert -byte-array-utf8-string-vb6.asp
' 接受包含 utf-8 数据的字节数组
'并将其转换为字符串
公共函数 ConvertStringToUtf8Bytes(ByRef strText As String) As Byte()
结束函数
I use ADO streams to do this sort of thing. I had to do this for a TON of websites where I was helping them with SEO automation.
http://www.nonhostile.com/howto-convert-byte-array-utf8-string-vb6.asp
' accept a byte array containing utf-8 data
' and convert it to a string
Public Function ConvertStringToUtf8Bytes(ByRef strText As String) As Byte()
End Function