Nevermind, though I'm not entirely sure this isn't a kind of bug.
If you change the Encoding by adding two equal signs to the end
"eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ=="

It properly decodes to:
{"userId":"b08f86af-35da-48f2-8fab-cef3904660bd"}

Some online decoding sites don't have the same issue. Like this site
does decode the original with the same outcome.
https://www.base64decode.org/

Just a bit confusing. It seems like 4D should throw and error or something.

dave


On Fri, Jun 29, 2018 at 8:06 AM, Dave Nasralla <dnasra...@gmail.com> wrote:
> Can anyone tell me what I am doing wrong here. In the code below I am
> getting back the same text I and trying to decode.
>
> C_BLOB($Blob_vx)
> C_TEXT($EncodedText_vt)
> $EncodedText_vt:="eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ"
> TEXT TO BLOB($EncodedText_vt;$Blob_vx;UTF8 text without length)
> BASE64 DECODE($Blob_vx)
> $DecodedText_vt:=BLOB to text($Blob_vx;UTF8 text without length)
> ALERT($DecodedText_vt)
>
> I must be missing something...
>
> I am using v16R6 on Mac OS.
>
> --
> David Nasralla
> Clean Air Engineering



-- 
David Nasralla
Clean Air Engineering
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to