Commit 7a4202c7 authored by hartman's avatar hartman
Browse files

* fix text encoding of subtitle filenames (and other paths).

parent 02ab7567
...@@ -237,7 +237,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -237,7 +237,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
o_dic = [NSMutableDictionary dictionaryWithObject: [o_mrl stringValue] forKey: @"ITEM_URL"]; o_dic = [NSMutableDictionary dictionaryWithObject: [o_mrl stringValue] forKey: @"ITEM_URL"];
if( [o_file_sub_ckbox state] == NSOnState ) 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 ) if( [o_file_sub_override state] == NSOnState )
{ {
[o_options addObject: [NSString stringWithFormat: @"sub-delay=%i", (int)( [o_file_sub_delay intValue] * 10 )]]; [o_options addObject: [NSString stringWithFormat: @"sub-delay=%i", (int)( [o_file_sub_delay intValue] * 10 )]];
......
...@@ -125,12 +125,21 @@ ...@@ -125,12 +125,21 @@
break; break;
case CONFIG_ITEM_STRING: 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_FILE:
case CONFIG_ITEM_DIRECTORY: case CONFIG_ITEM_DIRECTORY:
{ {
char *psz_value; char *psz_value;
NSString *o_value = [o_vlc_config stringValue]; 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 ); config_PutPsz( p_intf, psz_name, psz_value );
} }
......
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
- (char *)stringValue - (char *)stringValue
{ {
return strdup( [NSApp delocalizeString: [o_textfield stringValue]] ); return strdup( [[o_textfield stringValue] fileSystemRepresentation] );
} }
@end @end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment