Re: [xml] Default Catalog On Windows, Deprecated API








I don't know how much that matters -- down the road libxml2 uses the C API
(fopen. etc) which takes a const char* and does not support UTF-8 encoded
filenames anyways, at least not the ms runtime, so even if you used the
wide version of GetModuleFileNameW and converted it to UTF-8 the end result
is that the C file apis would fail anywyas.  The only place that would
benefit from that are custum i/o handlers that may properly use UTF-8
encoded paths.



|---------+---------------------------->
|         |           "Igor Zlatkovic" |
|         |           <igor zlatkovic c|
|         |           om>              |
|         |           Sent by:         |
|         |           xml-bounces gnome|
|         |           .org             |
|         |                            |
|         |                            |
|         |           06/14/2004 04:53 |
|         |           AM               |
|---------+---------------------------->
  
------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                           
                   |
  |       To:       Mark_Vakoc peoplesoft com                                                                 
                   |
  |       cc:       xml gnome org                                                                             
                   |
  |       Subject:  Re: [xml] Default Catalog On Windows, Deprecated API                                      
                   |
  
------------------------------------------------------------------------------------------------------------------------------|





On 14.06.2004 06:20, Mark_Vakoc peoplesoft com wrote:

Nevermind, just re-read the patch and realized you were building off the
result of GetModuleFilename.   Oops.

Thanks, that brings another issue to attention.

I call GetModuleFileNameA. NTFS uses Unicode. If libxml is in a folder
which contains, say, Japanese Katakana in its name, the patch will fail.
I should call GetModuleFileNameW and convert the resulting UTF-16LE
string to UTF-8 before calling xmlCanonicPath with it.

Hm. But this could make the thing uncompilable on systems without the NT
kernel. Hm. Perhaps it is better to use XML_CATALOG_FILES variable in
the environment with non-latin file names.

Ciao,
Igor
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]