in reply to Is It Text-Editable???

You could do a sysread of the first N bytes and see if any are above 0x7F. I wouldn't recommend it, though. Personally, I'd depend on the extension and let people hang themselves.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

Replies are listed 'Best First'.
Re: Re: Is It Text-Editable???
by eserte (Deacon) on Apr 28, 2004 at 08:17 UTC
    You could do a sysread of the first N bytes and see if any are above 0x7F.

    But only if you're looking for english text. For virtually any other language, the range between 0xa0 and 0xff is valid, too. And there are sure some encodings where 0x7f-0xa0 is also valid.