From f393a4eb51a5f8ed0e64f09f76cbafe57d7dcb57 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 28 Jul 2012 09:59:01 +0200 Subject: added utf8_basename() This is a locale independent version of basename to work around https://bugs.php.net/bug.php?id=37738 The function is not yet used anywhere. It should be at least used where ever non-ASCII filenames and paths are handled. Simply replacing all calls to basename() with this function might be the safest. --- _test/tests/inc/utf8_basename.test.php | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 _test/tests/inc/utf8_basename.test.php (limited to '_test') diff --git a/_test/tests/inc/utf8_basename.test.php b/_test/tests/inc/utf8_basename.test.php new file mode 100644 index 000000000..1cb5b5606 --- /dev/null +++ b/_test/tests/inc/utf8_basename.test.php @@ -0,0 +1,69 @@ +assertEquals($test[2], utf8_basename($test[0], $test[1]), "input: ('".$test[0]."', '".$test[1]."')"); + } + } + +} \ No newline at end of file -- cgit v1.2.3