troubleshooting Question

Base64 Encode/Decode UTF8 Delphi 2010

Avatar of cebasso
cebassoFlag for United States of America asked on
Delphi
10 Comments2 Solutions14645 ViewsLast Modified:
Hello,

I have a Unit where in Delphi 2007 i was able to encode/decode strings being compatible with the PHP version of Base64...

So, a String base64 encoded in PHP, i was able to decode it in my Delphi app..

Now using Delphi 2010, i wanna make it compatible... but i really don't have idea where is the problem... when i try to encode a text, it comes like "Chinese Characters"... i can change all Strings from the Unit to AnsiString but then i don't have a base64 support for Unicode!

Attached is the Unit... somebody know how to make it compatible with Unicode?

I don't have enough knowledge to change things in this unit where will be able to support unicode... in the official website, it's just abandoned and since 2003 there is no updates!
but i know that its possible, since there are a lot of examples over the web but in .NET or javascript, C# not in Delphi :(

To test the unit, is something like

Example, 2 Edits over the form and 1 button

OnButton Click
Edit2.Text := SZFullEncodeBase64(Edit1.Text);

Best Regards,
Carlos SZCodeBaseX.pas
ASKER CERTIFIED SOLUTION
Emmanuel PASQUIER
Freelance Project Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2010

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros