]> git.sesse.net Git - vlc/commitdiff
* fix text encoding of subtitle filenames (and other paths).
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 29 Aug 2004 15:11:50 +0000 (15:11 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sun, 29 Aug 2004 15:11:50 +0000 (15:11 +0000)
modules/gui/macosx/open.m
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs_widgets.m

index 46a9e12959fbbade13e4a73c52f45746eb13226e..fbbced1c0365e1e1a636f4724f8ffa64db559094 100644 (file)
@@ -237,7 +237,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
         o_dic = [NSMutableDictionary dictionaryWithObject: [o_mrl stringValue] forKey: @"ITEM_URL"];
         if( [o_file_sub_ckbox state] == NSOnState )
         {
-            [o_options addObject: [NSString stringWithFormat: @"sub-file=%s", [[o_file_sub_path stringValue] UTF8String]]];
+            [o_options addObject: [NSString stringWithFormat: @"sub-file=%s", [[o_file_sub_path stringValue] fileSystemRepresentation]]];
             if( [o_file_sub_override state] == NSOnState )
             {
                 [o_options addObject: [NSString stringWithFormat: @"sub-delay=%i", (int)( [o_file_sub_delay intValue] * 10 )]];
index aa8df737e9e7ce1471c8ef20a1daaebeb6ee1f15..af61f0f02eb13541eb02db84f8dd2d993fca11a2 100644 (file)
             break;
     
         case CONFIG_ITEM_STRING:
+            {
+                char *psz_value;
+                NSString *o_value = [o_vlc_config stringValue];
+                psz_value = (char *)[o_value UTF8String];
+    
+                config_PutPsz( p_intf, psz_name, psz_value );
+            }
+            break;
+
         case CONFIG_ITEM_FILE:
         case CONFIG_ITEM_DIRECTORY:
             {
                 char *psz_value;
                 NSString *o_value = [o_vlc_config stringValue];
-                psz_value = (char *)[o_value UTF8String];
+                psz_value = (char *)[o_value fileSystemRepresentation];
     
                 config_PutPsz( p_intf, psz_name, psz_value );
             }
index 1368269a1a1ba34651280363b22d5676337caae8..957acdd68df14105dc25ba54ac2f0959b0fa0206 100644 (file)
 
 - (char *)stringValue
 {
-    return strdup( [NSApp delocalizeString: [o_textfield stringValue]] );
+    return strdup( [[o_textfield stringValue] fileSystemRepresentation] );
 }
 
 @end