Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About some bugs and on Windows server #27

Open
ids93216 opened this issue Nov 5, 2015 · 4 comments
Open

About some bugs and on Windows server #27

ids93216 opened this issue Nov 5, 2015 · 4 comments

Comments

@ids93216
Copy link

ids93216 commented Nov 5, 2015

Hi,

I'm using Windows servers, here is my server's detail:
Windows 8.1
Nginx 1.9.5
PHP 5.6.14

I found many bugs (errors) on PHP 5.6.
Example like mktime() will show error, must use time() to instead; htmlspecialchars() will return empty string on non UTF-8 servers.

It cannot work on my server, all Chinese files and folders are not showing.
Is there any idea to fix these problems?

And I want to help Encode Explorer to translate to Chinese Traditional, is there any way to help you?

Thanks.

@ghost
Copy link

ghost commented Dec 26, 2015

Hi ids93216,
I think if we change the lines 3038 and 3079 to the following:
htmlspecialchars($file->getName(),ENT_QUOTES, "UTF-8")
instead of
htmlentities($dir->getName())
your problem with the empty strings will be solved. I tested it on PHP 5.6.14 (Debian) and so far the avaiable "simplified Chinese" shows the chars without issues.

If you want to contribute with your translation, you can submit a pull request. Just copy the english or simplified chinese and change the translation in the quotes. Example:
$_TRANSLATIONS["zh_CN"] = array(
"file_name" => "文件名",
just use zh_TW instead of zh_CN in the first line.

I hope this will help you so far.
regards,
Ivo

@NewEraCracker
Copy link
Contributor

AFAIK, PHP on windows uses the ASCII versions of Win32 API so any char which is not on the ASCII table will simply not work.

@ids93216
Copy link
Author

I found maybe is a solution on Windows servers.

There is a library called "php-wfio" on Github.
https://github.com/kenjiuno/php-wfio

This library only need to install it and add "wfio://" at the file path.
Example like "wfio://D:\中文名", I've tried it's working well.

Is there can support this library and make it as a option?
Thanks.

@NewEraCracker
Copy link
Contributor

I think you should give a try to Linux, as you probably won't spot such problems there, because OS is UTF-8 ready.

It was already a pain to implement encoding conventions on windows platform for Swedish and Russian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants