From: "Martin J. Dürst" Date: 2013-04-18T09:52:18+09:00 Subject: [ruby-core:54420] Re: [ruby-trunk - Bug #8286][Rejected] Can't decode non-MIME Base64 On 2013/04/18 8:20, naruse (Yui NARUSE) wrote: > > Issue #8286 has been updated by naruse (Yui NARUSE). > > Status changed from Open to Rejected > > Your Base64Compatible.encode64 is buggy. > > Base64Compatibleencode64("Lorem ipsum dolor sit amet, consectetur adipiscing elit.") returns > "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4", > but its length is 75. > It must add padding and it shall be "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4". The two strings are exactly the same (checked mechanically). Yui, can you give the correct example? Thanks, Martin. > Anyway you can use Base64.strict_encode64 if you don't need line feeds.