summaryrefslogtreecommitdiff
path: root/inc/utf8.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-01-23 11:29:05 +0100
committerandi <andi@splitbrain.org>2005-01-23 11:29:05 +0100
commit49c713a33bc794629ec41fbddf2c29ebd124e926 (patch)
tree7495d09e17027bc369066de81f6b4020ec653243 /inc/utf8.php
parent4b282abadc616ab67e208e405a245822a189c961 (diff)
downloadrpg-49c713a33bc794629ec41fbddf2c29ebd124e926.tar.gz
rpg-49c713a33bc794629ec41fbddf2c29ebd124e926.tar.bz2
Unicode filenames with URL encoding
darcs-hash:20050123102905-9977f-1065a1112bfd47caed0f198b94e5226c81351b64.gz
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