solarflow99 wrote:
Here's a question thats been puzzling me, i've been trying to figure out how
file types can be set.  I have a regular text file that is being recognized
as: ASCII Pascal program text and wondering how I can change that.  Not sure
if this even has anything to do with iconv, theres no clear distinction I
can find between file types and file encodings.

What is recognising your "regular text file" as "ASCII Pascal program text?"

As I understand it, there's no _proper_ way to distinguish on *x. Some programs use the suffix, such as .JPG. That is recognised practice on Windows, and common practice on *x.

The file program inspects the file's contents and guesses from that.

The kernel checks the executable bits for its more limited application, and only inspects the contents for executable files.

The best way I know is the accepted practice in OS/2[1], the information is stored in extended attributes: extended attributes are used to _describe_ a file beyond the information in the basic directory information.

If a file contains "(*" or *) near its start (I don't know how near, but the first sector or first block are plausible limits) and generally seems to be locale-encoded text, file's likely flagged it as pascal source code, but file's only guessing.

[1] Correctly, OS/2 doesn't have files as we know them, they're objects of a particular class. There's a generic "file" object which a properly-written OS/2 program would subclass to create Pascal Source, IBM Works Document, IBM Works Spreadsheet etc. I mention IBM Works (previously Footprint Works) because it was written in this way. Any suffix in an IBM Works document of any kind has no significance.


--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to