Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to compare UNICODE strings?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Hatschi
Master Cheater
Reputation: 2

Joined: 28 Jan 2010
Posts: 327

PostPosted: Tue Dec 30, 2014 7:36 am    Post subject: How to compare UNICODE strings? Reply with quote

How to compare for unicode strings in AA?

cmp dword ptr[esi+8],'Test'

doesn't work. It fails. The string value at this address is 'T' but the unicode value is 'Test'.

//edit: Nvm ofc I can compare for 4 bytes. But just curious, if I would want to enter the string in AA what should I type for unicode string?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25806
Location: The netherlands

PostPosted: Tue Dec 30, 2014 8:25 am    Post subject: Reply with quote

a compare like that isn't possible in CE, nor would it be practical. You can then only test 2 characters at a time. First Te and then st
i'd go for a loop that compares the two strings

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Hatschi
Master Cheater
Reputation: 2

Joined: 28 Jan 2010
Posts: 327

PostPosted: Tue Dec 30, 2014 9:09 am    Post subject: Reply with quote

Ah so unicode takes the twice memory space as normal string?
Because normal strings I've always compared by taking the first four letters (if compared as dword).
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25806
Location: The netherlands

PostPosted: Tue Dec 30, 2014 9:38 am    Post subject: Reply with quote

Yes, in unicode Test would be stored as T,0, e,0, s,0, t,0
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites