Seite 3 von 3
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 30.04.2012 12:29
von DROOPY
Code: Alles auswählen
Procedure.s ConformationAsciiEtenduVersAscii(Text.s)
ReplaceString(Text,Chr(130),"é",2)
ReplaceString(Text,Chr(135),"ç",2)
ReplaceString(Text,Chr(131),"â",2)
ReplaceString(Text,Chr(133),"à",2)
ReplaceString(Text,Chr(136),"ê",2)
ReplaceString(Text,Chr(137),"ë",2)
ReplaceString(Text,Chr(138),"è",2)
ReplaceString(Text,Chr(140),"î",2)
ReplaceString(Text,Chr(150),"û",2)
ReplaceString(Text,Chr(151),"ù",2)
ReplaceString(Text,Chr(240),"-",2)
ReplaceString(Text,Chr(242),"=",2)
ReplaceString(Text,Chr(255)," ",2)
; Nettoie des caractères < 31
For n=1 To 31
If n=9 : Continue : EndIf
If n=10 : Continue : EndIf ; LF fout la zone je le supprime
; If n=13 : Continue : EndIf
ReplaceString(Text,Chr(n),"",2)
Next
ProcedureReturn Text
EndProcedure
this code could be multi-os ?
Could you check this zip file please
http://droopylib.pagesperso-orange.fr/test.zip
This archive can't be extrated successfully
Regards
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 30.04.2012 13:48
von HeX0R
DROOPY hat geschrieben:this code could be multi-os ?
Didn't my version above work for you?
I don't have any problems with this zip.
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 30.04.2012 15:15
von DROOPY
Nice works again Hex0r
Your code works like a charm.
Just remain a problem extracting empty files (size of 0), which won't be extracted.
Could you look @ this ?
Regards
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 30.04.2012 16:18
von HeX0R
DROOPY hat geschrieben:
Just remain a problem extracting empty files (size of 0), which won't be extracted.
Could you look @ this ?
Should be fixed.
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 30.04.2012 16:38
von DROOPY
empty files are now correctly extrated.
Just remain a little problem, the function return 0 if just an empty file is extracted !?
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 27.12.2012 20:34
von ts-soft
HeX0R hat geschrieben:
Update (30.04.2012)
Dateinamen mit Umlauten werden korrekt entzippt.
(Da ist das zib-Format ein wenig altbacken, ich fürchte die Zip-Routine produziert beim zippen von Umlautdateinamen auch falsche Namen.
Muss ich mal bei Gelegenheit abändern)
Code: Alles auswählen
Structure _ZIP_Local_File_Header_
signature.l ;0x04034b50
VersionNeeded.w
Generalflag.w
Compressionmethod.w
Last_modification.l
CRC32.l
Compressed_size.l
Uncompressed_size.l
Filename_length.w
Extrafield_length.w
*Filename
EndStructure
In Generalflag.w ist das 11te Bit für UTF-8 zu setzen.
siehe:
http://www.purebasic.fr/english/viewtop ... 76#p398976
Gruß
Thomas
Re: PipiFax-ZIP-Include [all OS]
Verfasst: 29.12.2012 00:57
von HeX0R
Entpacken sollte aber richtig funktionieren, oder?
Ich hatte nur zips gefunden, die die Dateinamen noch zusätzlich im "Extrafield" gespeichert hatten, daher lese ich das aus.
Beim speichern allerdings war ich faul, sehe ich gerade, da speichere ich einfach ascii...
[Edit]
Sodele, mal eben eingebaut, danke für den Tipp
