GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on July 21, 2024

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

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on July 21, 2024

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.

from encode-explorer.

ids93216 avatar ids93216 commented on July 21, 2024

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.

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on July 21, 2024

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.

from encode-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.