Index: includes/language.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/language.inc,v
retrieving revision 1.26
diff -u -p -r1.26 language.inc
--- includes/language.inc	25 Jan 2010 10:38:34 -0000	1.26
+++ includes/language.inc	1 Mar 2010 01:05:24 -0000
@@ -342,7 +342,7 @@ function language_from_default() {
  *    - The path without the prefix on success, the given path otherwise.
  */
 function language_url_split_prefix($path, $languages) {
-  $args = empty($path) ? array() : explode('/', $path);
+  $args = empty($path) ? array() : explode('/', trim($path, '/'));
   $prefix = array_shift($args);
 
   // Search prefix within enabled languages.
