On sábado, 31 de agosto de 2013 11:41:20, Till Oliver Knoll wrote: > Am 31.08.2013 um 03:00 schrieb Thiago Macieira <thiago.macie...@intel.com>: > > .... > > > > As I said in the other email, if you're going to run this code on Windows, > > you should stop using fopen and iostreams. > > Out of curiosity (and since I am a "spoiled Qt child" and basically never > touched most of the "C Lib" API ever since, let alone the STL *quickly > cruzifies himself*): what is the problem with fopen on Windows? The thing > with "wchar vs char" (?) and how Windows encodes file names?
Yes. On Windows, the filesystem stores the file names in UTF-16. However, the 8-bit API for applications uses a non-Unicode codec on most Windows versions (the exception is Vietnamese Windows). For example, on Windows on English uses CP1252, which is a slight expansion on Latin 1 (ISO-8859-1) with a few more characters in the 0x80-0xA0 range. That means the filesystem may have paths that the 8-bit API cannot open and the user may give you a file name that cannot be encoded into 8-bit. -- 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