[vlc-commits] commit: logger: output to file in local character set ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Jul 22 19:35:16 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 22 20:25:48 2010 +0300| [cc856b0f652a65dba308025ef3502abea1534d25] | committer: Rémi Denis-Courmont 

logger: output to file in local character set

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc856b0f652a65dba308025ef3502abea1534d25
---

 modules/misc/logger.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index e633f9d..bb21c8d 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -33,6 +33,7 @@
 #include <vlc_plugin.h>
 #include <vlc_interface.h>
 #include <vlc_fs.h>
+#include <vlc_charset.h>
 
 #include <assert.h>
 
@@ -405,8 +406,8 @@ static const char ppsz_type[4][11] = {
 
 static void TextPrint( const msg_item_t *p_msg, FILE *p_file )
 {
-    fprintf( p_file, "%s%s%s\n", p_msg->psz_module, ppsz_type[p_msg->i_type],
-             p_msg->psz_msg );
+    utf8_fprintf( p_file, "%s%s%s\n", p_msg->psz_module,
+                  ppsz_type[p_msg->i_type], p_msg->psz_msg );
 }
 
 #ifdef HAVE_SYSLOG_H



More information about the vlc-commits mailing list