This fixes opening files with non-UTF8 sequences in their path (as long
as the file:// URI is %-encoded correctly).
#include <vlc_network.h>
#include <vlc_url.h>
#include <vlc_sout.h>
#include <vlc_network.h>
#include <vlc_url.h>
#include <vlc_sout.h>
+#include <vlc_charset.h>
#ifndef IPPORT_FTP
# define IPPORT_FTP 21u
#ifndef IPPORT_FTP
# define IPPORT_FTP 21u
return VLC_EGENERIC; /* ASCII and directory not supported */
}
decode_URI( url->psz_path );
return VLC_EGENERIC; /* ASCII and directory not supported */
}
decode_URI( url->psz_path );
+ /* FIXME: check for UTF-8 support, otherwise only ASCII is allowed */
+ EnsureUTF8( url->psz_path );
#include <vlc_url.h>
#include "vlc_playlist.h"
#include "vlc_interface.h"
#include <vlc_url.h>
#include "vlc_playlist.h"
#include "vlc_interface.h"
+#include <vlc_charset.h>
#include "item.h"
#include "info.h"
#include "item.h"
#include "info.h"
/* Make the name more readable */
if( p_i->psz_name )
/* Make the name more readable */
if( p_i->psz_name )
decode_URI( p_i->psz_name );
decode_URI( p_i->psz_name );
+ EnsureUTF8( p_i->psz_name );
+ }
}
else
{ /* Strip login and password from title */
}
else
{ /* Strip login and password from title */
test_decode ("%2", "%2");
test_decode ("%0000", "");
test_decode ("%2", "%2");
test_decode ("%0000", "");
test_decode ("T%C3%a9l%c3%A9vision+%e2%82%Ac", "Télévision €");
test_decode ("T%C3%a9l%c3%A9vision+%e2%82%Ac", "Télévision €");
- test_decode ("T%E9l%E9vision", "T?l?vision");
- test_decode ("%C1%94%C3%a9l%c3%A9vision", "??élévision"); /* overlong */
+ test_decode ("T%E9l%E9vision", "T\xe9l\xe9vision");
/* Base 64 tests */
test_b64 ("", "");
/* Base 64 tests */
test_b64 ("", "");