[lug] help

rm at fabula.de rm at fabula.de
Thu Jul 29 06:03:15 MDT 2004


On Thu, Jul 29, 2004 at 05:04:30PM +0530, vinatha.komirishetty at wipro.com wrote:
> 
> Hi
> 

Hello Vinatha,

somehow it's hard to answer your question with so little context but i'll give
it a try anyway: 

> 
>      I would like to find the type of file (ie) whether it' s  an
> UTF-8/Ascii/Ebcidic File..could u plz do enough help to solve this
> issue.
> 

Hmm, first of all, you are probably not looking for the _type_ of the file
but for the _character encoding_ (given your examples: ascii/utf-8/ebcdic ...).
This is pretty hard (actually, in most cases impossible) _unless_ you have a 
pretty good idea about the contents of the file.
Since files are represented on a Linux system as streams of bytes without any
meta information about things like character encoding you will actually have to
read the whole file to exclude some of the encodings (for example: ASCII is a seven
bit encoding, so if you read a byte whose highest bit is set than it can't be ASCII).
There are similar possible exclusion rules for utf-8/utf-16 etc. but there still are
a lot of cases where you can't distinguish between encodings (iso-8859-1/iso-8859-5 etc.).

HTH Ralf Mattes
> Regards,
> 
> Vinatha.
> 
> 
> 
> 
> -----Original Message-----
> From: lug-bounces at lug.boulder.co.us
> [mailto:lug-bounces at lug.boulder.co.us] On Behalf Of
> lug-request at lug.boulder.co.us
> Sent: Thursday, July 29, 2004 4:53 PM
> To: Vinatha Komirishetty (WT01 - Retail, CPG & Distribution)
> Subject: Welcome to the "LUG" mailing list
> 
> Welcome to the LUG at lug.boulder.co.us mailing list!
> 
> To post to this list, send your email to:
> 
>   lug at lug.boulder.co.us
> 
> General information about the mailing list is at:
> 
>   http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 
> If you ever want to unsubscribe or change your options (eg, switch to
> or from digest mode, change your password, etc.), visit your
> subscription page at:
> 
> 
> http://lists.lug.boulder.co.us/mailman/options/lug/vinatha.komirishetty%
> 40wipro.com
> 
> 
> You can also make such adjustments via email by sending a message to:
> 
>   LUG-request at lug.boulder.co.us
> 
> with the word `help' in the subject or body (don't include the
> quotes), and you will get back a message with instructions.
> 
> You must know your password to change your options (including changing
> the password, itself) or to unsubscribe.  It is:
> 
>   wipro123
> 
> Normally, Mailman will remind you of your lug.boulder.co.us mailing
> list passwords once every month, although you can disable this if you
> prefer.  This reminder will also include instructions on how to
> unsubscribe or change your account options.  There is also a button on
> your options page that will email your current password to you.
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately
> and destroy all copies of this message and any attachments.
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us portf67 channel=#colug



More information about the LUG mailing list