Page 1 of 1

plugin Encode - Base64 encode

Posted: 30.11.2022 01:28
by pllkvv
When I apply the Base64 encode from the Encode plugin to an image file, I am unable to get the same results I see in Notepad++ or Inkscape.

I have tried the different options presented in the "File is maybe not text" window.

I found this and was able to create a plugin and the results match Notepad++:

https://stackoverflow.com/questions/606 ... ows-editor

I am curious why there is a difference. Am I missing a step when I use the Encode plugin? An Option isn't enabled?


Thank you.

Posted: 30.11.2022 08:33
by main Alexey
But how did you apply Encode plugin to an image file? did you open image file as plain text? I am not sure it works ok for binary/image files+ Encode plugin because some text encoding may break the result.

Posted: 30.11.2022 13:22
by pllkvv
File - Open file ... image file.

The "File is maybe not text" window appears: Edit anyway, Viewer - text mode, .... I have tried them all.

Once the file is opened, I select all and apply the base64. In some cases, nothing happens. In other cases - Edit Anyway, for example - I get results, but they differ from Notepad++.

So, I was trying to figure out why the results are different.

Posted: 30.11.2022 13:28
by main Alexey
Different because some text encoding is applied. not plain file is read into encoder. I will merge that sample plugin
https://stackoverflow.com/questions/606 ... ows-editor
into CudaExt soon. you must use this way.

Posted: 30.11.2022 14:01
by pllkvv
Thank you.

Posted: 01.12.2022 14:54
by main Alexey
I inserted this command (for any files) to plugin 'Encode'.

Posted: 02.12.2022 00:10
by pllkvv
Thank you! Works.