So, i tried the first steps to design a class which can create platform-independent (OS X, Window and Linux) Word-Files (.docx) and Open Office/Libre Office Files (.odt) without OLE etc. You also don’t need to have the MS Word etc. installed. The only thing you’ll need is the MBS Compression Plugin (29-40) to zip the files. It’s a lot of work to create such a class, because there are a lot of differences between the Office Open Xml (.docx) and the Open Document Format (.odt). Is there someone interessed to create such a project together? Just let me know via PM.
[quote=253431:@Tomas Jakobs]
As alternative you could use commandline in 7-zip, its free, and opensource(?)[/quote]
It works wonderfully, and you can unpack several types of archive.
The only issue I have still to find a Xojo answer for is high-UTF8 file names of archives and files inside ( pack or unpack), like Japanese names. The normal Win shell cannot handle these, and all the RB/Xojo answers I have found have some other failing - can’t do RAR, can’t do 7-Zip, can’t handle passworded files, can’t do archives > 4GB and so on. Admittedly the normal gui 7-Zip wrecks such file names unless run under applocale on an English system.
Use of extended characters in shell under Windows is strange even under the normal shell because it use the DOS CP850 encoding, not the native WindowsANSI.
Here is a way to create a file with extended ascii from the Xojo shell, using an ad hoc batch script :
[code] Dim t As TextOutputStream
Dim f As FolderItem = specialfolder.Desktop.child(“myscript.bat”)
If f <> Nil Then
t = TextOutputStream.Create(f)
t.WriteLine(ConvertEncoding(“dir > /Users/Mitch/Desktop/.txt”, Encodings.DOSLatin1))
t.Close
End If
dim batpath as folderitem
batpath = f.parent.child(“myscript.bat”)
dim s as new shell
s.execute(batpath.shellpath)
[/code]