Index: /trunk/admin/themes/default/template/include/datepicker.inc.tpl
===================================================================
--- /trunk/admin/themes/default/template/include/datepicker.inc.tpl	(revision 5199)
+++ /trunk/admin/themes/default/template/include/datepicker.inc.tpl	(revision 5200)
@@ -12,5 +12,5 @@
 
 {html_head}
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/themes/ui.datepicker.css">
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/theme/ui.datepicker.css">
 {/html_head}
 
Index: /trunk/admin/themes/default/template/themes_installed.tpl
===================================================================
--- /trunk/admin/themes/default/template/themes_installed.tpl	(revision 5199)
+++ /trunk/admin/themes/default/template/themes_installed.tpl	(revision 5200)
@@ -32,5 +32,5 @@
     <div class="themeActions">
       <a href="{$activate_baseurl}{$theme.id}" title="{'Make this theme available to users'|@translate}">{'Activate'|@translate}</a>
-      | <a href="{$delete_baseurl}{$theme.id}" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
+      | <a href="{$delete_baseurl}{$theme.id}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
     </div>
     
Index: /trunk/include/functions.inc.php
===================================================================
--- /trunk/include/functions.inc.php	(revision 5199)
+++ /trunk/include/functions.inc.php	(revision 5200)
@@ -33,12 +33,12 @@
 
 //----------------------------------------------------------- generic functions
-function get_extra_fields($order_by_fields) 
-{
-  $fields = str_ireplace(array(' order by ', ' desc', ' asc'), 
+function get_extra_fields($order_by_fields)
+{
+  $fields = str_ireplace(array(' order by ', ' desc', ' asc'),
 			 array('', '', ''),
 			 $order_by_fields
 			 );
   if (!empty($fields))
-  { 
+  {
     $fields = ','.$fields;
   }
@@ -415,31 +415,5 @@
       list($language_name) = @file($path.'/iso.txt');
 
-      $langdef = explode('.',$file);
-      if (count($langdef)>1) // (langCode,encoding)
-      {
-        $langdef[1] = strtolower($langdef[1]);
-
-        if (
-          $target_charset==$langdef[1]
-         or
-          ($target_charset=='utf-8' and $langdef[1]=='iso-8859-1')
-         or
-          ($target_charset=='iso-8859-1' and
-          in_array( substr($langdef[0],2), array('en','fr','de','es','it','nl')))
-        )
-        {
-          $language_name = convert_charset($language_name,
-              $langdef[1], $target_charset);
-          $languages[ $langdef[0] ] = $language_name;
-        }
-        else
-          continue; // the language encoding is not compatible with our charset
-      }
-      else
-      { // UTF-8
-        $language_name = convert_charset($language_name,
-              'utf-8', $target_charset);
-        $languages[$file] = $language_name;
-      }
+      $languages[$file] = convert_charset($language_name, $target_charset);
     }
   }
@@ -730,5 +704,5 @@
   // plugins want remove some themes based on user status maybe?
   $themes = trigger_event('get_pwg_themes', $themes);
-  
+
   return $themes;
 }
@@ -1241,26 +1215,10 @@
   }
   $target_charset = strtolower($target_charset);
-  $source_charset = '';
   $source_file    = '';
   foreach ($languages as $language)
   {
-    $dir = $dirname.$language;
-
-    if ($target_charset!='utf-8')
-    {
-      // exact charset match - no conversion required
-      $f = $dir.'.'.$target_charset.'/'.$filename;
-      if (file_exists($f))
-      {
-        $source_file = $f;
-        break;
-      }
-    }
-
-    // UTF-8 ?
-    $f = $dir.'/'.$filename;
+    $f = $dirname.$language.'/'.$filename;
     if (file_exists($f))
     {
-      $source_charset = 'utf-8';
       $source_file = $f;
       break;
@@ -1280,5 +1238,5 @@
       if ( !isset($lang_info) ) $lang_info=array();
 
-      if ( !empty($source_charset) and $source_charset!=$target_charset)
+      if ( 'utf-8'!=$target_charset)
       {
         if ( is_array($load_lang) )
@@ -1288,9 +1246,9 @@
             if ( is_array($v) )
             {
-              $func = create_function('$v', 'return convert_charset($v, "'.$source_charset.'","'.$target_charset.'");' );
+              $func = create_function('$v', 'return convert_charset($v, "'.$target_charset.'");' );
               $lang[$k] = array_map($func, $v);
             }
             else
-              $lang[$k] = convert_charset($v, $source_charset, $target_charset);
+              $lang[$k] = convert_charset($v, $target_charset);
           }
         }
@@ -1299,5 +1257,5 @@
           foreach ($load_lang_info as $k => $v)
           {
-            $lang_info[$k] = convert_charset($v, $source_charset, $target_charset);
+            $lang_info[$k] = convert_charset($v, $target_charset);
           }
         }
@@ -1313,8 +1271,5 @@
     {
       $content = @file_get_contents($source_file);
-      if ( !empty($source_charset) and $source_charset!=$target_charset)
-      {
-        $content = convert_charset($content, $source_charset, $target_charset);
-      }
+      $content = convert_charset($content, $target_charset);
       return $content;
     }
@@ -1324,18 +1279,15 @@
 
 /**
- * converts a string from a character set to another character set
+ * converts a string from utf-8 character set to another character set
  * @param string str the string to be converted
- * @param string source_charset the character set in which the string is encoded
  * @param string dest_charset the destination character set
  */
-function convert_charset($str, $source_charset, $dest_charset)
-{
-  if ($source_charset==$dest_charset)
+function convert_charset($str, $dest_charset)
+{
+  if ($dest_charset=='utf-8')
+  {
     return $str;
-  if ($source_charset=='iso-8859-1' and $dest_charset=='utf-8')
-  {
-    return utf8_encode($str);
-  }
-  if ($source_charset=='utf-8' and $dest_charset=='iso-8859-1')
+  }
+  if ($dest_charset=='iso-8859-1')
   {
     return utf8_decode($str);
@@ -1343,9 +1295,9 @@
   if (function_exists('iconv'))
   {
-    return iconv($source_charset, $dest_charset, $str);
+    return iconv('utf-8', $dest_charset, $str);
   }
   if (function_exists('mb_convert_encoding'))
   {
-    return mb_convert_encoding( $str, $dest_charset, $source_charset );
+    return mb_convert_encoding( $str, $dest_charset, 'utf-8' );
   }
   return $str; //???
