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 


WriteProcessMemory Accented Characters

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Fri Feb 14, 2014 11:32 pm    Post subject: WriteProcessMemory Accented Characters Reply with quote

Hey, I have a problem with writing accented and special characters to memory.

I have this ReadProcessMemory Call
Code:
WriteProcessMemory(pHandle, (void*)writeAddress, charArray, BytesToWrite, &BytesWritten);


It works fine with normal characters and letters, but if I try to write for example:
Code:
åäö ¬
the result is:
Code:
†„” ª


I've been googling for quite a while and haven't found any solutions so I thought to ask here.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Feb 14, 2014 11:53 pm    Post subject: Reply with quote

Bytes are bytes. It's up to you to interpret them
You need to convert the string to the encoding your interface is using.

Some interesting links:
http://en.wikipedia.org/wiki/Category:DOS_code_pages
http://en.wikipedia.org/wiki/Category:Windows_code_pages
http://en.wikipedia.org/wiki/Unicode

And this is the main reason cheat engine doesn't have better support for non ascii characters

_________________
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
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Sat Feb 15, 2014 1:33 am    Post subject: Reply with quote

The text looks fine when printed in the console window before writing it to memory though. Doesn't this mean that I don't have to convert the encoding of the string?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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