msg_Info( p_demux, "dumping raw stream to standard output" );
p_sys->p_file = stdout;
}
- else if( ( p_sys->p_file = fopen( p_sys->psz_file, psz_mode ) ) == NULL )
+ else if( ( p_sys->p_file = utf8_fopen( p_sys->psz_file, psz_mode ) ) == NULL )
{
msg_Err( p_demux, "cannot create `%s' for writing", p_sys->psz_file );
msg_Info( p_demux, "dumping raw stream to standard output" );
p_sys->p_file = stdout;
}
- else if( ( p_sys->p_file = fopen( p_sys->psz_file, psz_mode ) ) == NULL )
+ else if( ( p_sys->p_file = utf8_fopen( p_sys->psz_file, psz_mode ) ) == NULL )
{
msg_Err( p_demux, "cannot create `%s' for writing", p_sys->psz_file );
p_sys->b_file_out = VLC_FALSE;
}
}
- psz_vobname = ToLocale( p_demux->psz_path );
+ psz_vobname = strdup( p_demux->psz_path );
i_len = strlen( psz_vobname );
-
- strcpy( psz_vobname + i_len - 4, ".sub" );
+ memcpy( psz_vobname + i_len - 4, ".sub" );
/* open file */
- if( !( p_sys->p_vobsub_file = fopen( psz_vobname, "rb" ) ) )
+ p_sys->p_vobsub_file = utf8_fopen( psz_vobname, "rb" );
+ free( psz_vobname );
+ if( p_sys->p_vobsub_file == NULL )
{
msg_Err( p_demux, "couldn't open .sub Vobsub file: %s",
psz_vobname );
free( p_sys );
- LocaleFree( psz_vobname );
return VLC_EGENERIC;
}
- LocaleFree( psz_vobname );
return VLC_SUCCESS;
}
/* Open the log file and remove any buffering for the stream */
msg_Dbg( p_intf, "opening logfile `%s'", psz_file );
- p_intf->p_sys->p_file = fopen( psz_file, "wt" );
+ p_intf->p_sys->p_file = utf8_fopen( psz_file, "wt" );
if( p_intf->p_sys->p_file == NULL )
{
msg_Err( p_intf, "error opening logfile `%s'", psz_file );
psz_rrd_file = config_GetPsz( p_intf, "rrd-file" );
if( psz_rrd_file && *psz_rrd_file )
{
- p_intf->p_sys->p_rrd = fopen( psz_rrd_file, "w" );
+ p_intf->p_sys->p_rrd = utf8_fopen( psz_rrd_file, "w" );
}
p_intf->p_sys->p_sub = msg_Subscribe( p_intf , MSG_QUEUE_NORMAL );
sout_stream_sys_t *p_sys = p_stream->p_sys;
FILE *f;
- if( ( f = fopen( p_sys->psz_sdp_file, "wt" ) ) == NULL )
+ if( ( f = utf8_fopen( p_sys->psz_sdp_file, "wt" ) ) == NULL )
{
msg_Err( p_stream, "cannot open file '%s' (%s)",
p_sys->psz_sdp_file, strerror(errno) );
picture_t *p_pic )
{
int i, j;
- FILE *p_file = fopen( psz_file, "r" );
+ FILE *p_file = utf8_fopen( psz_file, "r" );
if ( p_file == NULL )
{