douque2016 2019-08-06 10:33
浏览 113

如何使用PHP检测CSV文件中的U + A0不间断空格?

I'm trying to parse a CSV file using PHP. In one of the CSV files one space character is causing an error, I need to return an error message if this happens. I checked on https://www.soscisurvey.de/tools/view-chars.php and the character is U+A0 or /u00A0

I tried:

if(ctype_print($row[0]) != true) {
 //show error
}

And this catches the U+A0 character but it also catches other characters that I don't want it to catch e.g. ê

How would I check for U+A0 only? I'm pretty new to PHP so any help appreciated, thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 怎么把多于硬盘空间放到根目录下
    • ¥15 Matlab问题解答有两个问题
    • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
    • ¥15 LCD12864中文显示
    • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
    • ¥15 gsoap生成onvif框架
    • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
    • ¥15 stm32的can接口不能收发数据
    • ¥15 目标检测算法移植到arm开发板
    • ¥15 利用JD51设计温度报警系统