[xmlsec] non us-ascii filenames in user locale

Daniel Veillard veillard at redhat.com
Mon Jun 21 06:39:48 PDT 2004


On Mon, Jun 21, 2004 at 03:21:09PM +0300, Roumen Petrov wrote:
> not in UTF-8 encoding. Might this is libxml (2.6.3) bug ?

  first upgrade, current release of libxml2 is 2.6.10, this may help.

> I don't think that xmlsec should depend and use directly iconv. I think 
> than xmlsec should ensure reference url in UTF-8 and escaped only. Rest 
> of this migth should do libxml.
> What is your opinion ?

  My opinion is that making a library change its behaviour based on 
user locale is a serious error. It makes support and debug horrible.
I have tried very hard to avoid this mistake in libxml2 and libxslt,
I don't see why this should be done for xmlsec. Filename are not
a reason to do so in my opinion, you get a string of bytes, you
use it for OS operations, those OS operations are not dependant on the
locale, you don't care what the encoding of those bytes are for those
operations. The worse case is if you need to take that string to expose
it later (as an URI-Reference for example), then you're in trouble
and heuristics might be needed, but not based on locales...

Daniel

-- 
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