How does UltraEdit detect a binary file?

How does UltraEdit detect a binary file?

4
NewbieNewbie
4

    Aug 17, 2006#1

    Hello -

    I notice that when I open a binary file (such as a .gif) in Ultra Edit, it immediately goes into "hex" mode. Text files go into "standard" mode.

    Are you willing to divulge what you're doing to determine the "binaryness" of a file?

    It seems to make this decision very quickly.

    Thank you.

    6,686585
    Grand MasterGrand Master
    6,686585

      Aug 18, 2006#2

      I can also answer your question because it is explained in help of UltraEdit at the page Advanced (Configuration - Editor) at option

      Allow editing of text files with HEX 00's without converting them to spaces
      When a file is loaded the editor checks the first 3K of the file and if it contains more than one NULL (HEX 00) the file is considered a binary/HEX file.

      I should add, if the file is not an Unicode file with or even without BOM. 2 NULL in sequence is for example not possible in an Unicode file, but nearly always exist in a binary file.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Aug 18, 2006#3

        To those interested in the response to tech support:

        "Thanks for your message. I believe UltraEdit-32 looks for at least
        three NULLS (HEX 00) within the first 7K of a file to determine if it's
        a binary file."

        This does seem to be it. The 2 nulls thing is no longer true.

        Thanks for your help.

        6,686585
        Grand MasterGrand Master
        6,686585

          Aug 19, 2006#4

          Aha, looks like the help must be updated. The 2 nulls in sequence was only supposed by me because Unicode files always contain nulls. I will report IDM, that they should update the help accordingly.
          Best regards from an UC/UE/UES for Windows user from Austria