Paste hexadecimal

Paste hexadecimal

2
NewbieNewbie
2

    Nov 26, 2006#1

    I have these bytes in hexadecimal:
    "42 4D 46 00 00 00 00 00 00 00 36 00 00 00 28 00 00 00 04 00 00 00 01 00 00 00 01 00 20 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF 00 00 00 FF"

    These bytes are of an image: bmp

    I want to paste with the ultraedit, but the obtained result is this:


    Someone knows how I can do it?

    Gracias

    6,683583
    Grand MasterGrand Master
    6,683583

      Nov 26, 2006#2

      It looks like you have in the clipboard the binary values not as binary, but as an ASCII string which contains the hex values of the binary bytes in ASCII. There is no function in UltraEdit to convert an ASCII string with hex values to a binary byte sequence.

      But maybe (not really tested) you can use the following macro to convert the ASCII string to a binary byte sequence.

      The macro property Continue if a Find with Replace not found must be checked for this macro.

      The macro will exit before it really starts the conversion when the ASCII string contains the ASCII sequence "3E3E21" or "213C3C" because then the conversion would definitively produce a wrong result.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      NewFile
      UnicodeToASCII
      Paste
      Top
      Find " "
      Replace All ""
      Find MatchCase RegExp "^([0-9A-F][0-9A-F]^)"
      Replace All ">>!^1!<<"
      Find ">>!3E3E21!<<"
      IfFound
      ExitMacro
      EndIf
      Find ">>!213C3C!<<"
      IfFound
      ExitMacro
      EndIf
      HexOn
      Find "3E3E213030213C3C"
      Replace All "3E3E2100213C3C"
      Find "3E3E213031213C3C"
      Replace All "3E3E2101213C3C"
      Find "3E3E213032213C3C"
      Replace All "3E3E2102213C3C"
      Find "3E3E213033213C3C"
      Replace All "3E3E2103213C3C"
      Find "3E3E213034213C3C"
      Replace All "3E3E2104213C3C"
      Find "3E3E213035213C3C"
      Replace All "3E3E2105213C3C"
      Find "3E3E213036213C3C"
      Replace All "3E3E2106213C3C"
      Find "3E3E213037213C3C"
      Replace All "3E3E2107213C3C"
      Find "3E3E213038213C3C"
      Replace All "3E3E2108213C3C"
      Find "3E3E213039213C3C"
      Replace All "3E3E2109213C3C"
      Find "3E3E213041213C3C"
      Replace All "3E3E210A213C3C"
      Find "3E3E213042213C3C"
      Replace All "3E3E210B213C3C"
      Find "3E3E213043213C3C"
      Replace All "3E3E210C213C3C"
      Find "3E3E213044213C3C"
      Replace All "3E3E210D213C3C"
      Find "3E3E213045213C3C"
      Replace All "3E3E210E213C3C"
      Find "3E3E213046213C3C"
      Replace All "3E3E210F213C3C"
      Find "3E3E213130213C3C"
      Replace All "3E3E2110213C3C"
      // and so on to FF (256 find and replace all)
      Find "3E3E214646213C3C"
      Replace All "3E3E21FF213C3C"
      Find "3E3E21"
      Replace All ""
      Find "213C3C"
      Replace All ""
      SelectAll
      Copy
      CloseFile NoSave

      Insert UnixReOn or PerlReOn (v12+ of UE) above command Find ">>!3E3E21!<<" if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 26, 2006#3

        I think that it is an option that the UltraEdit should have.

        For me, it has too many options, and those who are interested are difficult to find. It should have fewer options.

        Thank you for the help.

        PD.
        I do not speak English, pardon if I am wrong.