如何在Windows中获取文件名中带有冒号的文件? [英] How to get a file in Windows with a colon in the filename?

查看:358
本文介绍了如何在Windows中获取文件名中带有冒号的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从上传文件名中带有冒号(即C:/uploads/test : doc.html

I am getting errors from customers who are uploading files with a colon in the file name, i.e. C:/uploads/test : doc.html

我假设某些Unix或Linux系统正在生成该文件,但是我不确定用户如何用无效的文件名保存它们.我编写了一段代码,应该在上载时重命名该文档.我的问题是我无法测试它,因为我无法在Windows上获得文件名中带有冒号的文件.

I assume that some Unix or Linux system is generating the file but I'm not sure how the users are saving them with the invalid filename. I have coded a piece that should rename the document on upload. My problem is that I can't test it because I can't get a file on Windows that has a colon in the filename.

推荐答案

我发现了一个与冒号非常相似的字符,꞉" 是一个称为修饰符冒号的Unicode字符.它没有像全角冒号这样的空间,与常规冒号几乎完全相同,但是该符号有效.您可以从上方复制并粘贴它,也可以使用代码点 U + A789

I found a very similar character to a colon, "꞉" it is a unicode character called a Modifier Letter Colon. This has no space like the fullwidth colon and is pretty much exactly the same as a regular colon but the symbol works. You can either copy and paste it from above or you can use the code point, U+A789

这篇关于如何在Windows中获取文件名中带有冒号的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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