comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
Date: Thu, 5 Sep 2013 00:56:47 -0700 (PDT)
Date: 2013-09-05T00:56:47-07:00	[thread overview]
Message-ID: <544893cf-82aa-4f83-9147-f2d6c8437ffa@googlegroups.com> (raw)
In-Reply-To: <lyob87ket0.fsf@pushface.org>

On Thursday, September 5, 2013 6:39:23 AM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote: > <Is it right for me to think that the AdaGIDE editor and compiler are > not <amenable to files created in other software being copied in > directly?? what <say you O' Scribe. > > Answering my own question - YES. > > It has to go through the AdaGIDE editor to be 'baptised' in Ada - this > is sine qua non - it was staring me in the face - clearly a file > created in MS Word is not acceptable to an Ada compiler - but the same > file is quite acceptable after is has passed through the adaGIDE which > is of course ADA and makes it compatible to the compiler - I have just > tried a small test file - it raised a 'constraint error' when I try to > encrypt it as a word doc but when I pass the same file through the > AdaGIDE editor before trying to encrypt it it works fine. A .doc or .docx file is not a text file; it contains all sorts of binary data. I created example.docx containing just the text "Hello, world.". It came out as nearly 4 kb and is in fact a zip archive: $ unzip -l example.docx Archive: example.docx Length Date Time Name -------- ---- ---- ---- 573 09-05-13 05:29 _rels/.rels 531 09-05-13 05:29 word/_rels/document.xml.rels 208 09-05-13 05:29 word/settings.xml 845 09-05-13 05:29 word/document.xml 1903 09-05-13 05:29 word/styles.xml 595 09-05-13 05:29 word/fontTable.xml 379 09-05-13 05:29 docProps/app.xml 476 09-05-13 05:29 docProps/core.xml 1118 09-05-13 05:29 [Content_Types].xml -------- ------- 6628 9 files Files like this shouldn't be opened with Ada.Text_IO. I bet that if you create your plaintext using Notepad (maybe even Wordpad) you wouldn't need to go through AdaGIDE to create a file that your program *can* open.

I have tried Word Pad also and iit works equally well - but as you say the file extension .doc is taboo - must not be used - .dat is fine

Summarising.

Users can use 'Notepad' with .dat file extension say
Users can use 'Wordpad' with .dat file extension

If users insist on using MS Word then it must go through the AdaGIDE editor with a .dat file extension (if any).

Thanks again - Austin


  parent reply	other threads:[~2013-09-05  7:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 11:10 Calling a File for Encryption from outside of the Main Ada-95 Holding Folder Austin Obyrne
2013-09-04 19:37 ` Austin Obyrne
2013-09-04 19:47   ` Eryndlia Mavourneen
2013-09-04 20:23     ` Austin Obyrne
2013-09-04 20:37     ` Austin Obyrne
2013-09-04 21:31       ` Austin Obyrne
2013-09-05  5:39         ` Simon Wright
2013-09-05  7:16           ` Austin Obyrne
2013-09-05  7:56           ` Austin Obyrne [this message]
2013-09-05 11:33             ` Simon Wright
2013-09-05 15:46               ` Austin Obyrne
2013-09-05 16:00               ` Austin Obyrne
2013-09-05 16:08                 ` Eryndlia Mavourneen
2013-09-05 16:50                   ` Austin Obyrne
2013-09-05 17:42                     ` Eryndlia Mavourneen
2013-09-05 14:40         ` Eryndlia Mavourneen
2013-09-05 15:38           ` Austin Obyrne
2013-09-05  3:16 ` Dennis Lee Bieber
2013-09-05  6:57   ` Austin Obyrne
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox