GMax24
Forum Replies Created
-
Forum: Plugins
In reply to: [File Away] Can i enable right click to copy url (encoded) in fileaway ?Sorry, mistyped attribute name.
Short lived url it’s what I need, but specific user involved breaks the idea.
OK.
Forum: Plugins
In reply to: [File Away] FileAway doesn't show all filesTHANK YOU 🙂
Forum: Plugins
In reply to: [File Away] FileAway doesn't show all filescomma, :^)
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…
Forum: Plugins
In reply to: [File Away] FileAway doesn't show all filesOK. this means “Won’tFix” because author don’t need it
Forum: Plugins
In reply to: [File Away] FileAway doesn't show all fileswhere I can find this snippet ?
Forum: Plugins
In reply to: [File Away] FileAway doesn't show all files>>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=truethru plugin options