[GRANTED] SC function wish - Base64 encoding/decoding

Features wanted...
admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

So, does it work now?

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

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

Post 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.

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

OK, then I will turn my system to Japanese and look myself... :twisted:

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post 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"!

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post by Marco »

raw?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

yep

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post by Marco »

Please please, tell more! How does it work under the hood? What can you give in input?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

see change log :)

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post by Marco »

I had to read it twice (subtle wording), but now I see :D
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post 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");
Attachments
utf8bom.xys
rename to .txt
(3 Bytes) Downloaded 125 times
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

Works fine here.

What's your test file?

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post by Marco »

The file I attached, but with a txt estension (else I can't upload it here).
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 65239
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

Yes, there is still a problem. :evil:

Cannot do anything before the quarterfinals. :ball:

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

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

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

Post by Marco »

:beer: :ball:
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

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

Post 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:

Post Reply