csv转为utf8编码,如何将csv文件编码转换为utf-8

博主旧系统使用iso - 8859 - 13编码,新系统无此编码但支持UTF - 8和UTF - 16。用其他编码打开CSV文件部分符号无法识别,导入新系统报错。最终通过文本编辑器,先以iso - 8859 - 13打开原文件,创建UTF - 8空文件,复制内容解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Is it possible to convert csv data that has iso-8859-13 encoding to UTF-8?

My old system does not have UTF-8 encoding, it uses only iso-8859-13. The system that I need to import to does not have iso-8859-13, but has both UTF-8 and UTF-16. If I try to open the csv file with an encoding other than iso-8859-13, then some symbols are not recognized. If I try to import such file into the new system, it gives an error that I have wrong encoding. I can only import it using windows-1252, but then it will import with unrecognized symbols. What can I do to convert it to normal encoding such as UTF-8?

解决方案

I was able to convert simply using text editor. I opened csv file with iso-8859-13 encoding. Then created empty csv file with utf-8. Then simply copied everything from one csv to another. Then I could import it into new system.

Previously I tried to do this with libreoffice, but for some reason it would save with iso-8859-13 encoding.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值