在PHP 5.3和Windows Vista中使用日语文件名吗? [英] Working with Japanese filenames in PHP 5.3 and Windows Vista?

查看:86
本文介绍了在PHP 5.3和Windows Vista中使用日语文件名吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试编写一个简单的脚本,该脚本在文件夹中查找并返回RSS feed中所有文件名的列表.但是,我碰到了一堵大墙...每当我尝试读取其中带有日语字符的文件名时,它都将其显示为?.我已经尝试过这里提到的解决方案: php日语文件的readdir问题名称-但是,由于某些原因,它们甚至无法使用

I'm currently trying to write a simple script that looks in a folder, and returns a list of all the file names in an RSS feed. However I've hit a major wall... Whenever I try to read filenames with Japanese characters in them, it shows them as ?'s. I've tried the solutions mentioned here: php readdir problem with japanese language file name - however they do not work for some reason, even with:

header('Content-Type: text/html; charset=UTF-8');
setlocale(LC_ALL, 'en_US.UTF8');
mb_internal_encoding("UTF-8");

在顶部(以纯文本格式导出,直到我可以解决为止).

At the top (Exporting as plain text until I can sort this out).

我该怎么办?我需要这个来工作,而且我没有太多时间.

What can I do? I need this to work and I don't have much time.

推荐答案

您可以在PHP中进行操作.编写一个小的C程序来读取目录并从PHP调用该程序.

You can do it in PHP. Write a small C program to read directories and call that program from PHP.

另请参阅: http://en.literateprograms.org/Directory_listing_(C,_Windows) http://www.daniweb.com/forums/thread74944.html http://forums.devshed. com/c-programming-42/reading-a-directory-in-windows-36169.html

这篇关于在PHP 5.3和Windows Vista中使用日语文件名吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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