[vlc-devel] commit: RAM: force meta data to UTF-8 ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 20 19:58:43 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 20 20:50:03 2010 +0200| [532e2f3efd8eab7ba54f7a5a262f451d36f15047] | committer: Rémi Denis-Courmont 

RAM: force meta data to UTF-8

As already stated (I think), this might be wrong. I have no clue what
codeset this file format is supposed to use.

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

 modules/demux/playlist/ram.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/demux/playlist/ram.c b/modules/demux/playlist/ram.c
index d2cb5b2..1f6e527 100644
--- a/modules/demux/playlist/ram.c
+++ b/modules/demux/playlist/ram.c
@@ -50,6 +50,7 @@ http://service.real.com/help/library/guides/realone/IntroGuide/HTML/htmfiles/ram
 #include <vlc_common.h>
 #include <vlc_demux.h>
 #include <vlc_url.h>
+#include <vlc_charset.h>
 
 #include "playlist.h"
 
@@ -282,7 +283,10 @@ static int Demux( demux_t *p_demux )
                            &psz_cdnum, &psz_comments ); /* clipinfo has various sub parameters, which is parsed by this function */
                     }
                     else if( !strcmp( psz_param, "author" ) )
+                    {
                         psz_author = decode_URI_duplicate(psz_value);
+                        EnsureUTF8( psz_author );
+                    }
                     else if( !strcmp( psz_param, "start" ) )
                     {
                         i_start = ParseTime( psz_value, strlen( psz_value ) );
@@ -304,9 +308,15 @@ static int Demux( demux_t *p_demux )
                         }
                     }
                     else if( !strcmp( psz_param, "title" ) )
+                    {
                         psz_title = decode_URI_duplicate(psz_value);
+                        EnsureUTF8( psz_title );
+                    }
                     else if( !strcmp( psz_param, "copyright" ) )
+                    {
                         psz_copyright = decode_URI_duplicate(psz_value);
+                        EnsureUTF8( psz_copyright );
+                    }
                     else
                     {   /* TODO: insert option anyway? Currently ignores*/
                         /* INSERT_ELEM( ppsz_options, i_options, i_options, psz_option ); */




More information about the vlc-devel mailing list