Title: GMax24's Replies | WordPress.org

---

# GMax24

  [  ](https://wordpress.org/support/users/gmax24/)

 *   [Profile](https://wordpress.org/support/users/gmax24/)
 *   [Topics Started](https://wordpress.org/support/users/gmax24/topics/)
 *   [Replies Created](https://wordpress.org/support/users/gmax24/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/gmax24/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/gmax24/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/gmax24/engagements/)
 *   [Favorites](https://wordpress.org/support/users/gmax24/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] Can i enable right click to copy url (encoded) in fileaway ?](https://wordpress.org/support/topic/can-i-enable-right-click-to-copy-url-encoded-in-fileaway/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/can-i-enable-right-click-to-copy-url-encoded-in-fileaway/#post-6016458)
 * Sorry, mistyped attribute name.
 * Short lived url it’s what I need, but specific user involved breaks the idea.
 * OK.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] FileAway doesn't show all files](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/page/2/#post-5930378)
 * THANK YOU 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] FileAway doesn't show all files](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/#post-5930373)
 * 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…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] FileAway doesn't show all files](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/#post-5930298)
 * OK. this means “Won’tFix” because author don’t need it
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] FileAway doesn't show all files](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/#post-5930278)
 * where I can find this snippet ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Away] FileAway doesn't show all files](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/)
 *  Thread Starter [GMax24](https://wordpress.org/support/users/gmax24/)
 * (@gmax24)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/fileaway-doesnt-show-all-files/#post-5930228)
 * >>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

Viewing 6 replies - 1 through 6 (of 6 total)