On sábado, 31 de agosto de 2013 17:27:55, Michael Jackson wrote: > Well, unfortunately I can not remove HDF5 as or entire file format is based > on it. So with that limiting factor in place and knowing that I may have a > file path coming from a standard Open/Save Dialog how would _you_ handle > this situation? These are my design parameters that I have and so I just > want to figure out the way that will cause the least amount of headaches.
I wouldn't. I would throw the library away and report it to the vendor telling them to fix their library. Showing the user "sorry, I can't open that file, please rename it or move it to a different directory" is unacceptable. > On the plus side of things HDF5 does have a C++ API where some of the class > methods will take a std::string but I am not sure this is going to help in > this case. It's not. std::string has undefined encoding. The question is: what encoding does the file name API expect? Most API expect it to be in the locale encoding and that is not acceptable on Windows. File name API on Windows *must* be Unicode. Anything else is a fatal design flaw. PS: see if there's an API that allows you to pass an opened file, like a FILE* or a file descriptor. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest