[fpc-pascal] TZipper and special file names like "atenção.txt" (#26213)
silvioprog
silvioprog at gmail.com
Fri May 23 17:37:29 CEST 2014
2014-05-23 12:30 GMT-03:00 Michael Van Canneyt <michael at freepascal.org>:
>
> 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.
Hum... isn't possible to works with files like "Silvio Clécio.txt"? :(
I tested SynZIP (http://synopse.info/fossil/wiki?name=Downloads) in Delphi,
and it worked fine:
with TZipWrite.Create('Silvio Clécio.txt.zip') do
try
AddDeflated('Silvio Clécio.txt', True, 9);
finally
Free;
end;
But, is inviable to I port my backup program to Delphi now.
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140523/ccfb899b/attachment.html>
More information about the fpc-pascal
mailing list