--- /home/slack/VLC_0.8.6b_SVN/modules/gui/skins2/src/theme_loader.cpp	2006-10-13 16:02:45.000000000 +1000
+++ modules/gui/skins2/src/theme_loader.cpp	2007-01-29 22:12:16.000000000 +1100
@@ -410,10 +410,10 @@
     const string &sep = OSFactory::instance( getIntf() )->getDirSeparator();
 
     DIR *pCurrDir;
-    struct dirent *pDirContent;
+    const char *pDirContent;
 
     // Open the dir
-    pCurrDir = opendir( rootDir.c_str() );
+    pCurrDir = utf8_opendir( rootDir.c_str() );
 
     if( pCurrDir == NULL )
     {
@@ -423,16 +423,16 @@
     }
 
     // Get the first directory entry
-    pDirContent = (dirent*)readdir( pCurrDir );
+    pDirContent = utf8_readdir( pCurrDir );
 
     // While we still have entries in the directory
     while( pDirContent != NULL )
     {
-        string newURI = rootDir + sep + pDirContent->d_name;
+        string newURI = rootDir + sep + pDirContent;
 
         // Skip . and ..
-        if( string( pDirContent->d_name ) != "." &&
-            string( pDirContent->d_name ) != ".." )
+        if( string( pDirContent ) != "." &&
+            string( pDirContent ) != ".." )
         {
 #if defined( S_ISDIR )
             struct stat stat_data;
@@ -454,7 +454,7 @@
             else
             {
                 // Found the theme file?
-                if( rFileName == string( pDirContent->d_name ) )
+                if( rFileName == string( pDirContent ) )
                 {
                     themeFilePath = sFromLocale( newURI );
                     closedir( pCurrDir );
@@ -463,7 +463,7 @@
             }
         }
 
-        pDirContent = (dirent*)readdir( pCurrDir );
+        pDirContent = utf8_readdir( pCurrDir );
     }
 
     closedir( pCurrDir );
--- /home/slack/VLC_0.8.6b_SVN/modules/gui/skins2/src/theme_repository.cpp	2006-10-13 16:02:45.000000000 +1000
+++ modules/gui/skins2/src/theme_repository.cpp	2007-01-29 22:13:26.000000000 +1100
@@ -98,13 +98,13 @@
 void ThemeRepository::parseDirectory( const string &rDir )
 {
     DIR *pDir;
-    struct dirent *pDirContent;
+    const char *pDirContent;
     vlc_value_t val, text;
     // Path separator
     const string &sep = OSFactory::instance( getIntf() )->getDirSeparator();
 
     // Open the dir
-    pDir = opendir( rDir.c_str() );
+    pDir = utf8_opendir( rDir.c_str() );
 
     if( pDir == NULL )
     {
@@ -114,12 +114,12 @@
     }
 
     // Get the first directory entry
-    pDirContent = (dirent*)readdir( pDir );
+    pDirContent = utf8_readdir( pDir );
 
     // While we still have entries in the directory
     while( pDirContent != NULL )
     {
-        string name = pDirContent->d_name;
+        string name = pDirContent;
         string extension;
         if( name.size() > 4 )
         {
@@ -142,7 +142,7 @@
             delete[] text.psz_string;
         }
 
-        pDirContent = (dirent*)readdir( pDir );
+        pDirContent = utf8_readdir( pDir );
     }
 
     closedir( pDir );
