/ Published in: Groovy
                    
                                        
Removes diacritics from file name before adding it to the archive. Archive file name retains diacritics.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
import java.util.zip.*
import java.text.*
sLetter = Normalizer.normalize(sLetter, Normalizer.Form.NFD)
try{
sAux += "" + cLetter
}
}
}
return sAux
}
name = f.toString()
zipname = name.substring(0, name.lastIndexOf(".")) + ".zip"
nameInZip = toBase2(name.substring(name.lastIndexOf("\\") + 1))
println nameInZip
// nejde napsat out.write(f.readbytes()), protoze na 100mb
// souboru to zahlasi out of memory
ins = f.newInputStream()
out.closeEntry()
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                