Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(PowerBuilder) UU Encoding and DecodingDemonstrates how to UU encode and decode.
integer li_rc oleobject loo_Crypt string ls_S1 string ls_S2 string ls_S3 oleobject loo_Crypt2 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Crypt = create oleobject // Use "Chilkat_9_5_0.Crypt2" for versions of Chilkat < 10.0.0 li_rc = loo_Crypt.ConnectToNewObject("Chilkat.Crypt2") if li_rc < 0 then destroy loo_Crypt MessageBox("Error","Connecting to COM object failed") return end if ls_S1 = "This string is to be UU encoded" loo_Crypt.UuMode = "666" loo_Crypt.UuFilename = "something.txt" // UU encode: ls_S2 = loo_Crypt.EncodeString(ls_S1,"ansi","uu") // Note: Call crypt.Encode instead of crypt.EncodeString // to UU encode binary bytes (i.e. non-text binary data). Write-Debug ls_S2 // UU decode: loo_Crypt2 = create oleobject // Use "Chilkat_9_5_0.Crypt2" for versions of Chilkat < 10.0.0 li_rc = loo_Crypt2.ConnectToNewObject("Chilkat.Crypt2") ls_S3 = loo_Crypt2.DecodeString(ls_S2,"ansi","uu") // Note: Likewise, call crypt.Decode to decode non-text binary data. Write-Debug ls_S3 // Show the file permissions mode and filename found // in the UU encoded data: Write-Debug "UuMode = " + loo_Crypt2.UuMode Write-Debug "UuFilename = " + loo_Crypt2.UuFilename destroy loo_Crypt destroy loo_Crypt2 |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.