summaryrefslogtreecommitdiff
path: root/inc/utf8.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/utf8.php')
-rw-r--r--inc/utf8.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/inc/utf8.php b/inc/utf8.php
index 5e5dfe8bb..d06cfc58c 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -7,6 +7,30 @@
*/
/**
+ * URL-Encode a filename to allow unicodecharacters
+ *
+ * Slashes are not encoded
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function utf8_encodeFN($file){
+ $file = rawurlencode($file);
+ $file = str_replace('%2F','/',$file);
+ return $file;
+}
+
+/**
+ * URL-Decode a filename
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function utf8_decodeFN($file){
+ $file = rawurldecode($file);
+ return $file;
+}
+
+
+/**
* This is a unicode aware replacement for strtolower()
*
* Uses mb_string extension if available