From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.148.8 with SMTP id to8mr2020877pab.0.1378367807467; Thu, 05 Sep 2013 00:56:47 -0700 (PDT) X-Received: by 10.49.99.37 with SMTP id en5mr301050qeb.8.1378367807246; Thu, 05 Sep 2013 00:56:47 -0700 (PDT) Path: border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!news.glorb.com!n2no22041306pbg.1!news-out.google.com!z6ni33820pbu.0!nntp.google.com!j7no292313qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 5 Sep 2013 00:56:47 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.173.125.168; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg NNTP-Posting-Host: 86.173.125.168 References: <43c22997-0bb7-4ad6-879f-c5b2d8584f8a@googlegroups.com> <80934511-70fb-4f2b-ac4a-30ce5fd4a34c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <544893cf-82aa-4f83-9147-f2d6c8437ffa@googlegroups.com> Subject: Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder. From: Austin Obyrne Injection-Date: Thu, 05 Sep 2013 07:56:47 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:183304 Date: 2013-09-05T00:56:47-07:00 List-Id: On Thursday, September 5, 2013 6:39:23 AM UTC+1, Simon Wright wrote: > Austin Obyrne writes: > On Wednesday, Septemb= er 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote: > not directly?? what > 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 m= e 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 th= e compiler - I have just > tried a small test file - it raised a 'constrain= t 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 c= ame out as nearly 4 kb and is in fact a zip archive: $ unzip -l example.doc= x Archive: example.docx Length Date Time Name -------- ---- ---- ---- 573 0= 9-05-13 05:29 _rels/.rels 531 09-05-13 05:29 word/_rels/document.xml.rels 2= 08 09-05-13 05:29 word/settings.xml 845 09-05-13 05:29 word/document.xml 19= 03 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 p= laintext 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