> -----Original Message-----
> From: Rob Richards [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 23, 2007 2:23 PM
> To: Trappel Martin
> Cc: [email protected]
> Subject: Re: [xml] Read&Write Files with unicode/UTF-16 names 
> (on Windows) (was: RE: Read tree from FILE* ?)
> 
> Trappel Martin wrote:
> > Still, allow me to phrase two questions:
> > * Is there an opposite to xmlReadIO, something like xmlWriteIO ?
> >   
> maybe xmlSaveToIO
> > * Is anyone using the xmlRegisterInputCallbacks(..) to open 
> files with 
> > wide character names? (It seems to me this would require some 
> > additional wrapping, since the callback functions get char* for the 
> > file URL. So I'd first had to encode the wchar_t filename 
> to utf8 and 
> > the, in the callback, decode it again.)
> >   
> You should encode the filenames to UTF-8 before passing them. 
> Unless you have any other requirements, you shouldn't need 
> custom I/O handlers. As of 2.6.24, under windows, the io 
> handlers will first attempt to convert the path from utf-8 to 
> wide chars and use the _wxxxx functions to stat and open. If 
> you need to support prior versions, you can always use the 
> code within xmlIO.c to write your own handlers.
> 

Thanks a lot! This is fantabulous news :-)

( Is this mentioned anywhere in the docs? Did I look in the wrong places for
this info? )

best regards / mit freundlichen Grüßen,
Martin Trappel
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to