THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2006 at 22:32, xxxxxxxx wrote:
Cinema 4D Version: 8.2-10.0
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I know this is a little wide in scope, but since you guys implemented a zip class, maybe you can tell me how to get zlib to work with unicode/multicharacter filepaths.
The problem is that gzopen() is just a wrapper for fopen() which, as we all know, only understands CHAR - not WCHAR or such. When passed a filepath with >8-bit characters, it fails. For instance, Poser(tm) where the (tm) is a non-ASCII character causes failures because fopen() can't possibly handle non-ASCII characters (by definition and implementation). You need something like wfopen() for this! This would be superbly great.... except that libz.dylib is slightly beyond my ability to control. Apple supplies that - their fault completely (blame - blame - blame!). How can they provide a zlib library for a UNICODE and multi-character system without providing support for the said library to open UNICODE and multi-character file paths (shame - shame - shame! on them).
The only way around a simple compressed-file-in to decompressed-file-out would be to open the file another way for read and stream the decompression in memory to another file for write. Don't know how fun that is, but let's just say that I used the former method as it wasn't ten times as complex...