On Fri, May 23, 2014 17:30, Michael Van Canneyt wrote: > On Fri, 23 May 2014, silvioprog wrote: > >> Hello, >> I've tried to compress a small file with TZipper class, but, even it >> compressing correcly, internaly, the file name is wrong. After >> compressed, the original "atenção.txt" file was renamed to >> "atenþÒo.txt". >> >> I opened an issue here: >> >> http://bugs.freepascal.org/view.php?id=26213 >> >> I have a program that makes daily backups, and just discovered this >> problem when I noticed that it did not compressing files with names >> with special characters. > > This is not fixable. > The zip standard has no rules for encoding filenames. > Whatever bytes you put in is what comes out. > You are entirely responsible for handling the encoding.
While I more or less agree with your statement, I could find a note about some UTF-8 support extension (see http://stackoverflow.com/questions/15519493/how-to-add-zip-entry-with-utf-8-name-to-zip) which might help to certain extent (if supported by FPC). If nothing else, this would be probably relevant at least for a future (trunk) Unicode-compatible version of that class. Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal