How to set padding for base64 encoding

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 7 05:06:06 PDT 2016


On Thursday, 7 April 2016 at 11:59:09 UTC, rikki cattermole wrote:
> On 07/04/2016 11:49 PM, Suliman wrote:
>> It's look like my data have padding that cause crush on 
>> function:
>> std.file.write("output.png", Base64.decode(myimg));
>>> Invalid character:
>>
>> It's look like I should to use template function, but I can't 
>> figure out
>> how to use it. Could anybody show example?
>>
>> My code:
>> http://www.everfall.com/paste/id.php?pzpdgvtyb3ji
>>
>> https://dlang.org/phobos/std_base64.html#.Base64
>
> "abc" strings are not multiline.
> Use """abc""" for that purpose.
>
> Also perhaps next time test with a smaller file.. say 1 by 1 
> with no extra chunks.

If I wrap data with """ or ` .... ` I am getting same error. It's 
seems that problem that last charset is =


More information about the Digitalmars-d-learn mailing list