如何从php中的excel文件中插入mysql中的hindi数据 [英] how to insert hindi data in mysql from excel file in php

查看:89
本文介绍了如何从php中的excel文件中插入mysql中的hindi数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在mysql数据库中导入hindi text excel文件。但是当我使用php脚本导入mysql中的excel文件时,hindi字符在英文字符中更改并存储在db中。

所以plz帮助我如何使用excel文件在数据库中插入hindi文本

i want to import hindi text excel file in mysql database. but when i import excel file in mysql using php script hindi characters are change in english chars and stored in db.
so plz help me how to insert hindi text in database using excel file

推荐答案

1)正确设置UTF-8的Codeigniter: https://philsturgeon.uk/blog/2009/08/UTF-8-support-for-CodeIgniter/ [ ^ ]

2)检查xlsx文件中的xml是否为UTF8。您可能需要使用iconv或mb转换编码。您还可以尝试使用 mb_detect_encoding 检测读取的编码[ ^ ]
1) Set up Codeigniter for UTF-8 properly: https://philsturgeon.uk/blog/2009/08/UTF-8-support-for-CodeIgniter/[^]
2) Check if the xml in the xlsx file is utf8. You might need to convert encoding with iconv or mb. You can also try detecting the encoding read with mb_detect_encoding[^]


这篇关于如何从php中的excel文件中插入mysql中的hindi数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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