Decode Base64 data into a binary file

Decode Base64 data into a binary file

2
NewbieNewbie
2

    May 16, 2017#1

    Hi,

    Is it possible to decode data from Base64 string into a binary file?
    The main propose is to decode a string array from Base64 into a binary (PDF) file.

    Thanks

    6,603548
    Grand MasterGrand Master
    6,603548

      May 17, 2017#2

      Yes, this is possible, but requires a few preparations.

      Open Advanced - Settings or Configuration - Editor - Advanced and check the setting Allow editing of text files with hex 00's without converting them to spaces if existing at all (UE for Windows < v24.00 and UEStudio < v17.00). This is necessary because otherwise UltraEdit/UEStudio would replace each null byte by a space character after replacing Base64 encoded data with decoded data. This setting does not exist anymore since UE for Windows v24.00 and UEStudio v17.00 as null bytes are kept always without conversion to spaces.

      Open a new ANSI file and copy and paste into this file just the Base64 encoded data. It is important that the new file is not a Unicode file (UTF-16, UTF-8), but a 1 byte per character encoded text file not containing anything else than the Base64 encoded data.

      Press Ctrl+A to select all and use command Decode Base64 in menu Edit (traditional menus) or Advanced - Base64 - Base64 decode in ribbon mode or with using contemporary menus.

      The selected Base64 encoded data is replaced by decoded binary data displayed in text editing mode.

      Press F12 to open Save As dialog and save the new file with name and extension suitable for the decoded data.

      I verified the steps posted here with a PDF file with 1.499.046 bytes stored Base64 encoded in a generic mbox file (mail format) for which I had also the original PDF file for a binary comparison after decoding the data.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        May 17, 2017#3

        Hi,
        Thanks! Worked just fine!