Results 1 to 2 of 2

Thread: Identify Text file type

  1. #1

    Thread Starter
    Lively Member Flustor's Avatar
    Join Date
    Sep 2001
    Location
    A small hole in Birmingham
    Posts
    76

    Identify Text file type

    Hi Peeps!

    Anyone have any clues about how to identify if a text file is Unicode, ANSI.. or whatever?

    Thankyou!
    My Spidey senses are tingling!

  2. #2
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Identify Text file type

    Use notepad and save a text file (with any content) as UNICODE. Then open it using a System.IO.StreamReader and check out the first two bytes. This is a unique signature that signals that the file is saved as UNICODE.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width