Viewing 15 replies - 1 through 15 (of 17 total)
  • moonkir

    (@moonkir)

    +1

    moonkir

    (@moonkir)

    If upload file through File-UP
    file visible
    BUT
    word before the space is removed

    PHP 5.5.6

    Plugin Author thomstark

    (@thomstark)

    utf8 encoding is not fully supported in any version of PHP and it doesn’t look promising that it will be supported in the near future.

    The mb_pathinfo/mb_basename etc. functions have inconsistent performance across different servers.

    As I have long said, you need to use language-pack keyboards for your special characters, not utf8 characters. This is a php issue and a server issue. I’ve tried many times to come up with a solution that helps everybody everywhere. It’s just not possible.

    moonkir

    (@moonkir)

    Worked until Friday
    Today remarked that does not show the files in UTF-8

    Plugin Author thomstark

    (@thomstark)

    Well File Away hasn’t changed for months, so File Away isn’t the reason that it stopped working Friday, whatever “it” is and “worked” means.

    moonkir

    (@moonkir)

    I understand thomstark.
    Tell me where to look, I can not understand what could change.

    moonkir

    (@moonkir)

    thomstark, need youre help

    Thread Starter GMax24

    (@gmax24)

    >>As I have long said, you need to use language-pack keyboards for your special characters, not utf8 characters

    what relation the keyboard has to the filesystem-related file name encoding ?
    any modern linux OS have “xx_XX.UTF8” encoding as default.

    and if anyone need to display files, it’s returned by the OS without any keyboard interaction ??
    setlocale() in PHP it’s a bad thing and most easy way – it to fix related buggy finction. without ANY relation to utf or unicode.
    I publish some example above. may I suggest another ?

    class UTF
    {
        public static $ON = false;
    
        static public function pathinfo($path_file, $options = NULL)
        {
    	if (self::$ON) {
    		$path_file = strtr($path_file,array('\\'=>'/'));
    
    		preg_match("~[^/]+$~",$path_file,$file);
    		preg_match("~([^/]+)[.$]+(.*)~",$file[0],$file_ext);
    		preg_match("~(.*)[/$]+~",$path_file,$dirname);
    		if (!$dirname[1]) $dirname[1]='.';
    
    		$result = array('dirname' => $dirname[1],
    			'basename' => $file[0],
    			'extension' => (isset($file_ext[2]))?$file_ext[2]:false,
    			'filename' => (isset($file_ext[1]))?$file_ext[1]:$file[0]
    		);
    		if ($options & PATHINFO_DIRNAME) return $result['dirname'];
    		if ($options & PATHINFO_BASENAME) return $result['basename'];
    		if ($options & PATHINFO_EXTENSION) return $result['extension'];
    		if ($options & PATHINFO_FILENAME) return $result['filename'];
    		return $result;
    	}
    	else {
    		if ($options) return pathinfo($path_file, $options);
    		else return pathinfo($path_file);
    	}
        }
    }

    it performance impact are small for OFF state and if anyone need it, just need to execute UTF::$ON=true thru plugin options

    moonkir

    (@moonkir)

    Where to insert this code?

    moonkir

    (@moonkir)

    Had to give up your plug-in favor of the snippet. Which is the standard functions php lists the files in any encoding.

    Thread Starter GMax24

    (@gmax24)

    where I can find this snippet ?

    Thread Starter GMax24

    (@gmax24)

    OK. this means “Won’tFix” because author don’t need it

    Plugin Author thomstark

    (@thomstark)

    If you use a language pack keyboard to name your files, you will not have this issue. I have installed over 30 language pack keyboards, created files with every possible character in each keyboard, and have not run into any problems.

    This is a php issue. Many of the php functions necessary for File Away’s many, many functions, do not support utf-8. This is not a File Away issue.

    Period.

    Plugin Author thomstark

    (@thomstark)

    please update to version 3.9

    Thread Starter GMax24

    (@gmax24)

    comma, :^)
    Yes, this is NOT File Away BUG, but it is File Away ISSUE because of using WIDELY KNOWN BUGgy php function (above seven years!)

    once more: note – I’m not use setlocale() inside apache, apache have standard C locale.
    and once more: it’s not file-related problem, it’s character related problem. and it take place with non-utf characters too.
    and it’s EASY fixable by one preg_match() instead of pathinfo() in your code. (unlike universal function I suggested above)

    btw, thanks for new version, anyway I can fix it for myself now…

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘FileAway doesn't show all files’ is closed to new replies.