[vlc-devel] commit: Zip: fix handling of special characters (#2467) ( Jean-Philippe Andre )

jpd at m2x.nl jpd at m2x.nl
Wed May 20 23:06:55 CEST 2009


On Wed, May 20, 2009 18:53, git version control wrote:
> +bool isAllowedChar( char c )
> +{
> +    return ( c >= 'a' && c <= 'z' )
> +           || ( c >= 'A' && c <= 'Z' )
> +           || ( c >= '0' && c <= '9' )
> +           || ( c == ':' ) || ( c == '/' )
> +           || ( c == '\\' ) || ( c == '.' )
> +           || ( c == ' ' ) || ( c == '_' );
> +}

Do we have CTYPE=C ctype.h is*() functions available? In that case...


> **************************************************************************
> + * \brief Escape string to be XML valid
> + * Allowed chars are defined by the above function isAllowedChar()
> + * Invalid chars are escaped using non standard '?XX' notation.
> + * NOTE: We cannot trust VLC internal Web encoding functions
> + *       because they are not able to encode and decode some rare utf-8
> + *       characters properly. Also, we don't control exactly when they are
> + *       called (from this module).

Which ones? I'm curious. If we're talking invalid utf8 sequences, then
it's questionable support is desirable at all, and otherwise the question
rises whether the usual suspects need fixing.

I take it the non-standard escaping is a feature of the ZIP format?





More information about the vlc-devel mailing list