Re: encoding checker

From: Edward H Trager (ehtrager@umich.edu)
Date: Tue May 13 2003 - 12:31:09 EDT

  • Next message: Dan Kogai: "Re: how to sort by stroke (not radical/stroke)"

    On Tue, 13 May 2003, Sebastian Hofer wrote:

    > Hi list,
    > sorry for not presenting myself to the list properly. I am a bit in a hurry
    > and browsing the FAQs, etc brought no result. All I need is one thing:
    >
    > What I actually look for is a way to check files about the encoding they are
    > encoded in. Is there a SW that just tells me: This text is encoded in UTF8,
    > ASCII, UCS2 or whatever?

    On Linux there is the command line utility called "file" which will
    certainly segregate ASCII and UTF-8. Although it doesn't go very
    far in detecting other unicode encoding possibilities, I'm sure one could
    combine this with a little bit of Perl to meet your specific needs:

    $> file *
    images: directory
    index.html: HTML document text
    java.data: ASCII text
    ucs2.data: MP3, 56 kBits2, 64 kBits, 48 kHz, Stereo
    utf-16-be.data: data
    utf-16-le.data: data
    utf-7.data: ASCII text
    utf8.data: UTF-8 Unicode text
    utf8.data.png: PNG image data, 914 x 676, 2-bit colormap, non-interlaced

    >
    >
    > Thanks!
    >
    > Seb
    >
    >
    >
    >



    This archive was generated by hypermail 2.1.5 : Tue May 13 2003 - 13:53:20 EDT