nht3004 Posted May 1, 2009 Share Posted May 1, 2009 I know _StringEncrypt() used to encode and decode a string.But it can't use them for UNICODE Characters, please help me.Example, when I do function encrypt _StringEncrypt(1,"Nản","a",1),it returns CD1237C4EA7FAnd when I do decrypt _StringEncrypt(0,"CD1237C4EA7F","a",1), it returns N?n!]Please help, thanks alot! for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Mat Posted May 1, 2009 Share Posted May 1, 2009 (edited) hi there!possibly here??I don't know, but it seems to be a similar problem you are getting here.http://www.autoitscript.com/forum/index.php?showtopic=93644 Edited May 1, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
nht3004 Posted May 1, 2009 Author Share Posted May 1, 2009 hi there!possibly here??I don't know, but it seems to be a similar problem you are getting here.http://www.autoitscript.com/forum/index.php?showtopic=93644Could you show me the way to solve my problems, I can't get it clearly from http://www.autoitscript.com/forum/index.php?showtopic=93644, thanks alot! for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Mat Posted May 1, 2009 Share Posted May 1, 2009 What I was trying to indicate, and what someone in that thread failed to relise is that it is more than likely you corrupting the characters, not stringEncrypt. I may be wrong, and I am not the most knowledgable person on this topic by any stretch of the imagination. Make sure whatever text editor etc you are using is set to the right settings, as mentioned by valik in the thread. Other than that, I cannot help you unless you post the editor you are using as well as the settings you have already changed. Just post any info that may have been affecting the output. MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
KaFu Posted May 1, 2009 Share Posted May 1, 2009 Derived from ProgAndy's code here:#614497#include <String.au3> Global Const $SF_ANSI = 1 Global Const $SF_UTF8 = 4 $TestString_Raw = "Кириллица" ; Test 1 $TestString_Enc = _StringEncrypt(1, $TestString_Raw, "password", 1) $TestString_Dec = _StringEncrypt(0, $TestString_Enc, "password", 1) MsgBox(0,"Test 1, no conversion",$TestString_Raw & @crlf & $TestString_Enc & @crlf & $TestString_Dec) ; Test 2 $TestString_Enc = _StringEncrypt(1, BinaryToString(StringToBinary($TestString_Raw, $SF_UTF8), $SF_ANSI), "password", 1) $TestString_Dec = BinaryToString(StringToBinary(_StringEncrypt(0, $TestString_Enc, "password", 1), $SF_ANSI), $SF_UTF8) MsgBox(0,"Test 2, string converted", $TestString_Raw & @crlf & $TestString_Enc & @crlf & $TestString_Dec) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
nht3004 Posted May 2, 2009 Author Share Posted May 2, 2009 Derived from ProgAndy's code here: #614497 #include <String.au3> Global Const $SF_ANSI = 1 Global Const $SF_UTF8 = 4 $TestString_Raw = "Кириллица" ; Test 1 $TestString_Enc = _StringEncrypt(1, $TestString_Raw, "password", 1) $TestString_Dec = _StringEncrypt(0, $TestString_Enc, "password", 1) MsgBox(0,"Test 1, no conversion",$TestString_Raw & @crlf & $TestString_Enc & @crlf & $TestString_Dec) ; Test 2 $TestString_Enc = _StringEncrypt(1, BinaryToString(StringToBinary($TestString_Raw, $SF_UTF8), $SF_ANSI), "password", 1) $TestString_Dec = BinaryToString(StringToBinary(_StringEncrypt(0, $TestString_Enc, "password", 1), $SF_ANSI), $SF_UTF8) MsgBox(0,"Test 2, string converted", $TestString_Raw & @crlf & $TestString_Enc & @crlf & $TestString_Dec)Thanks alot. it is really helpful. it works! for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now