Commit 67910630 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

help: print UTF-8 BOM in vlc-help.txt on Windows

parent 4c835cb9
...@@ -695,8 +695,6 @@ static void Version( void ) ...@@ -695,8 +695,6 @@ static void Version( void )
*****************************************************************************/ *****************************************************************************/
static void ShowConsole( void ) static void ShowConsole( void )
{ {
FILE *f_help = NULL;
if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */ if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
if( !AllocConsole() ) return; if( !AllocConsole() ) return;
...@@ -710,14 +708,13 @@ static void ShowConsole( void ) ...@@ -710,14 +708,13 @@ static void ShowConsole( void )
freopen( "CONOUT$", "w", stderr ); freopen( "CONOUT$", "w", stderr );
freopen( "CONIN$", "r", stdin ); freopen( "CONIN$", "r", stdin );
f_help = fopen( "vlc-help.txt", "wt" ); if( freopen( "vlc-help.txt", "wt", stdout ) != NULL )
if( f_help != NULL )
{ {
fclose( f_help ); fputs( "\xEF\xBB\xBF", stdout );
freopen( "vlc-help.txt", "wt", stdout ); fprintf( stderr, _("\nDumped content to vlc-help.txt file.\n") );
utf8_fprintf( stderr, _("\nDumped content to vlc-help.txt file.\n") );
} }
else freopen( "CONOUT$", "w", stdout ); else
freopen( "CONOUT$", "w", stdout );
} }
/***************************************************************************** /*****************************************************************************
......
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