view binary objects as ascii or uft-8 in the viewer

Jacob Barhak shared this idea 17 months ago
Completed

Currently binary object - bytes in python 3 are displayed as binary in Hex.

It is possible to go to edit mode on a record and choose to switch to ascii or utf-8. However this is cumbersome since one cannot see many records at the same time and needs to push several buttons to get there.

It would be nicer if one can view binary data from the viewer and choose how it is displayed - ascii / utf-8 / Hex etc. Very similar to how once can change the display of numbers or dates - only for binary. This can be sometimes very helpful with all sorts of Unicode to text conversions.

The code for this exists already since once can do it in the editor, its just a simple addition of a menu that can be very helpful in some cases.


Jacob

Replies (2)

photo
1

Do you mean that the binary editor should remember the encoding type so that it can be displayed next time?

13ed56796eae60bf2d53d83c6c0f090f

photo
1

Thanks

You are on the right track - if you go to edit mode like in the image you showed, you already had to press the button and then press ascii - this requires several clicks. What I ask is to be able to show the binary data as ascii in the tree view or even in table view in the "matches" panel showing the result of a query, For example:e5261d7d3f87d322ec353964b750e580

In the image above I saved "unit_raw" as bytes in python which converts it to binary in Mongo. What I am asking is the ability to change how binary displayed and instead of showing binary(12) it will show ascii for each binary. You can achieve this by adding a menu item that reads: "display binary in :" and the options can be 1) length 2) base64, 3) hex, 4) UTF8, 5) ascii or in the future you can even use things like images....

This way you can see ascii data encoded as bytes in NoSQLBooster when viewing tables or tress for multiple records without clicking items to edit...

You already have options to change views for numbers and dates, binary seems another reasonable choice - it should be easy to implement and useful to see binary data.

photo
1

I generally understand your needs.


At present, the picture can be displayed in the tooltip. As follows:

4d65b6847b5bf565508e04bc0d77e45f


Need to be explained, because the binary data that people save directly is usually relatively large, and only part of it can be displayed in the viewer, such as "RXN0IHVsbGFtIGVpdXMgc2VkLiBFbmlt... (79124 bytes)".

photo
1

Nice - its good to know an image is possible to view this way already. Yet my current need is to see binary as ascii since it represents ascii in python and although this is supported through the editor, its cumbersome and takes a few clicks to get there and its not practical to view many records this way. It should be easy to implement since you already have the menus and the capabilities. Its just a matter of priority or if you have even a better solution.

photo
photo
1

Resolved in version 8.0

Leave a Comment
 
Attach a file