Page 4 of 5

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 08:24
by admin
So, does it work now?

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 08:56
by Enternal
admin wrote:So, does it work now?
Oh sorry! I misunderstood you. I thought you meant you had some crazy new ideas you want to try out and will not work on this in the mean time. Although you explicitly said "Try the next beta..." :oops:

Anyway, I tried it and unfortunately it still does not work. I also tried a fresh install to see if perhaps a setting is making it not work but the results were the same. The decoded output file from both beta 14.20.0307 and 14.20.0309 were exactly the same bitwise. So whatever you tried did not do anything for the decoding process.

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 09:05
by admin
OK, then I will turn my system to Japanese and look myself... :twisted:

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:15
by admin
OK, back from Japan. I think I got it, pretty tricky. This code will work with the next beta (v14.20.0310).

Code: Select all

"ENCODE 2"
  $Path = <curitem>;
  $Encoding = Base64Encode($Path, 2);
  WriteFile($Path . ".Base64.txt", $Encoding, , "ta");
"DECODE 3"
  $Path = <curitem>;
  $File = Base64Decode($Path, 3);
  $Path = RegexReplace($Path, "\.Base64\.txt$");
  WriteFile($Path, $File, , "r");
Note that WriteFile got a new mode "r"!

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:32
by Marco
raw?

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:36
by admin
yep

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:37
by Marco
Please please, tell more! How does it work under the hood? What can you give in input?

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:46
by admin
see change log :)

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 12:50
by Marco
I had to read it twice (subtle wording), but now I see :D

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 13:51
by Marco
Mmh, now I must be the one who's doing something wrong. I have the attached file (it's an empty text file with the utf8 bom). If I run this script I get a shorter file (the last byte missing), but if I try it on a zip file everything works fine...

Code: Select all

 $Path = "<curpath>\utf8bom.txt";
 $Encoding = Base64Encode($Path, 2);
 $File = Base64Decode($Encoding, 1);
 WriteFile("<curpath>\utf8bom.after.zip", $File, , "r");

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 15:07
by admin
Works fine here.

What's your test file?

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 15:17
by Marco
The file I attached, but with a txt estension (else I can't upload it here).

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 16:01
by admin
Yes, there is still a problem. :evil:

Cannot do anything before the quarterfinals. :ball:

Enjoy the games! :beer: :beer: :beer:

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 16:08
by Marco
:beer: :ball:

Re: [GRANTED] SC function wish - Base64 encoding/decoding

Posted: 04 Jul 2014 16:32
by Enternal
YES IT"S WORKING NOW!! WHEE!!!
.
.
.
oh

Now Marco gets to have his fun hehe and Don's crying is inevitable. :twisted: :ball: