GithubHelp home page GithubHelp logo

Comments (8)

simogeo avatar simogeo commented on May 22, 2024

with both PHP and JSP connector?

from filemanager.

jorgeoa avatar jorgeoa commented on May 22, 2024

I think PHP connector works fine.

I haven't time now to test the PHP connector, so I'll try it later.

from filemanager.

simogeo avatar simogeo commented on May 22, 2024

I'll do it, don't worry. Thanks for the bug report

from filemanager.

jorgeoa avatar jorgeoa commented on May 22, 2024

I found a workaround by converting from ISO-8859-1 to UTF-8 the currentpath parameter.

In function add, line 334 in FileManager.java, I'm using this code:

else if (item.getFieldName().equals("currentpath")){
currentPath = item.getString();
currentPath = new String (currentPath.getBytes("ISO-8859-1"),"UTF-8");
}

from filemanager.

trickydicky avatar trickydicky commented on May 22, 2024

This has been solved by using the function cleanString also for the creation of directories. That means that exotic characters are not allowed in a directory name. This may seem ugly, but the file manager in for instance Joomla does the same thing.

By the way, the error does occur also in the php connector

from filemanager.

simogeo avatar simogeo commented on May 22, 2024

trickydicky > works fine for php.
But I think we should have a unique policy regarding folder names. I will probably apply the cleanString methode as well

from filemanager.

jorgeoa avatar jorgeoa commented on May 22, 2024

Hi.

cleanString solves the problem in the upload proccess, but if the server contains folders or files with exotic chars, the problen is already there.

If I want to use this file manager in a existing webpage, and I have somo exotic characters in folders or files (this could be usual in languages like Spanish or French), I'll have a lot of problem with it.

I think that the clearString function in the right way, but I algo think that the filemanager should can deal with those cases. The 'new String (currentPath.getBytes("ISO-8859-1"),"UTF-8")' can solve it easily.

Also, I would like to propose that the cleanString will be more "exotic character friendly", I mean:

  • Replace "ñ" with "n"
  • Replace accented vowels with standard vowels: "áà" => "a"; "éè" => "e", etc.
  • Replace "ç" with "c"

And maybe, space with underscore? For readability...

Regards.

from filemanager.

simogeo avatar simogeo commented on May 22, 2024

This is done now for PHP connector. Should be applied to other connectors.

PHP conn : cleanString() is now called on addfolder() method

from filemanager.

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.