afrantzis / bless

Bless - Gtk# Hex Editor
GNU General Public License v2.0
210 stars 38 forks source link

binary to ascii #23

Closed adammaj1 closed 3 years ago

adammaj1 commented 4 years ago

Hi

Here is binary data which cna be translated to ascii. When I use online translator the conversion is like expected, but when I put the data int the Bless 0.6.0, then I can not see the text.

Why it is ?

afrantzis commented 4 years ago

Hi! It's likely that you are pasting the data into a non-binary area, so the data is not interpreted correctly (e.g., interpreted as hexadecimal values or raw ascii). You need to paste into a binary area.

For example, paste the following into ~/.config/bless/layouts/bless-binary-ascii.layout:

<layout>
  <area type="offset">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark red</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
      <oddrow>
        <evencolumn>
          <foreground>dark red</foreground>
          <background>white</background>
        </evencolumn>
      </oddrow>
    </display>
  </area>

  <area type="separator">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark green</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
    </display>
  </area>

  <area type="binary">
  </area>

  <area type="separator">
    <display>
      <evenrow>
        <evencolumn>
          <foreground>dark green</foreground>
          <background>white</background>
        </evencolumn>
      </evenrow>
    </display>
  </area>

  <area type="ascii">
  </area>
</layout>

Then start bless and select the bless-binary-ascii.layout from the View->Layouts dialog. Copy the binary data from the web page and paste it into Bless while the cursor is active in the binary area. That should get you the desired result.

adammaj1 commented 4 years ago

Yes it works now. Thx. Can this layout be in new version of bless ?