Path: news.daimi.aau.dk!not-for-mail From: Wilfried Rupflin Newsgroups: comp.lang.beta Subject: Re: Accessing DATA-Files with BETA Date: Thu, 26 Feb 1998 15:03:37 +0100 (MET) Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 63 Approved: mailtonews@daimi.aau.dk Distribution: world Message-ID: <199802261403.PAA01120@noatun.mjolner.dk> Reply-To: Wilfried Rupflin NNTP-Posting-Host: daimi.daimi.aau.dk Xref: news.daimi.aau.dk comp.lang.beta:11426 >Hello everyone! > >I want to search a data file for a special string - the problem is that >there are many characters which BETA's file.get cannot read. The >algorithm works very well as I have tested with a simple text-file that >contains the string that I want to search for. >But within that data-file there are some characters which e.g. >Microsoft's Wordpad can read, but Microsoft's Notepad does not - as >BETA. > >So my question is: is there a possibility to read "unreadable" >characters which might not be visualizable on the "normal" screen (but >Wordpad can!) ? > >Kind regards > >Sascha Kimmel >http://users.aol.com/trsoftware >http://infinf.home.ml.org Have a look at the definition of class file: File: Stream (*) (# <>; EntryDesc:< DiskEntry; Entry: @EntryDesc (*) ; name: @ (*) ...; Put::< ...; Get::< ...; ... Eos::< ...; touch: entry.touch (*) ...; delete: (*) ...; binary:< booleanvalue (* THIS(File) is binary if value is true. On some systems a * non-binary (e.g. textual) file may behave differently, than * a binary file. A binary file is always treated as raw bytes, * whereas a non-binary file may treat some characters, notably * the end-of-line marker, differently. *) ; openRead: (*) ...; openWrite: (*) ...; openAppend: (*) ...; openReadWrite: (*) ...; openReadAppend: (*) ...; flush: (*) ...; close: (*) ...; ... #) You may declare a binary file object like this e.g.: (# f: @file (# binary:: (# do true->value #) #); do ... #) Hope this helps. Wilfried Rupflin