[xmlsec] Re: non us-ascii filenames in user locale

Daniel Veillard veillard at redhat.com
Tue Jun 29 04:26:12 PDT 2004

On Tue, Jun 29, 2004 at 01:10:39PM +0200, xs04.jmdesp at free.fr wrote:
> Selon Daniel Veillard <veillard at redhat.com>:
> > [...]. So now
> > that URI can be used as such "mod%C3%A8le.xml" for all URI based processing
> > too.
> > 
> > [...] if the filename is non-ascii, then UTF-8
> > encode it, URI-escape it at you level before calling any of the libraries
> > and it should just work ! [...]
> This is theorically the cleanest way of doing it, but it won't work if nothing
> is done in libxml2/xmlsec to handle that case (as I describe in the other
> message, "test if url UTF-8, if yes, convert to locale, if not use directly".
> This should be done only for "file://". If you don't do that, it'll work only if
> the locale is UTF-8).

  I think:

   1/ I proved it work with libxml2 now out of the box, c.f. the xmllint example
   2/ it is totoally independant of the user locale at the libxml2/xmlsec
      level, playing with locale is left to the "user" code.

So I don't understand your objections at all. libxml2 will not do the
path to URI conversion, you do it, that's the only way to keep things
clean and working assuming working means dealing with locales.
And no, it cannot be done only for file:// URLs as there is no relative
path definition for file:// and that need to be handled too.


Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

More information about the xmlsec mailing list