> > On Thu, Nov 13, 2008 at 5:29 PM, Stephen John Smoogen
<[EMAIL PROTECTED]> wrote:
> > > On Thu, Nov 13, 2008 at 9:56 AM, solarflow99 <[EMAIL PROTECTED]>
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.

> > How are you determining that it is recognized as ASCII Pascal program
> > text? I am going to guess using the program 'file' which uses various
> > magic to determine what a file is. The only way to change that is to
> > either make file smarter for that type of data or alter the data
> > itself to meet what file is expecting. If you are asking about
> > something like httpd you can add items where files ending in .ico are
> > considered a specific data format when downloaded.

> thats right, its the file command.  So it seems like file uses
> "magic" and iconv encoding is something entirely different?  Even
> pasting a few lines into a new file still makes it recognized as Pascal.

They are very different.  file is there to tell you what it thinks is
contained inside the file, which may include information about the
encoding.  With iconv the encoding is the actual character encoding[1],
like ASCII, BALTIC, ISO_8859-1, and UTF-8. I played with some pascal
snippets I found and a certain format of header changed it to 'ASCII
English text', but I tried manually reproducing effect w/ different text
and did not get a different result so I'm not sure what was happening
there.

-greg


[1] http://en.wikipedia.org/wiki/Character_encoding

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

Reply via email to