classmemory readstring encoding error

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
whynotregister
Posts: 147
Joined: 05 Nov 2016, 22:42

classmemory readstring encoding error

14 Jul 2018, 02:10

When reading a character in memory, the Korean string is not output normally.
Image

msgbox % calc.readstring(0x2af1a10,0,"utf-8")

0x2af1a10 When this address is read, "abcdefghuikl = 한글테스트" should be output.
However, classmemory output the Korean string as abcdefghuikl = ??????????

What can I do to resolve this?
gregster
Posts: 8992
Joined: 30 Sep 2013, 06:48

Re: classmemory readstring encoding error

14 Jul 2018, 03:07

Which file encoding are you using for your AHK script file? https://autohotkey.com/docs/FAQ.htm#nonascii
whynotregister
Posts: 147
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 04:22

gregster wrote:Which file encoding are you using for your AHK script file? https://autohotkey.com/docs/FAQ.htm#nonascii
Thank you, but I am asking for encoding errors in classmemory only
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: classmemory readstring encoding error

14 Jul 2018, 05:36

msgbox % calc.readstring(0x2af1a10,0,"utf-8")
I do not know what this is, but maybe try msgbox % calc.readstring(0x2af1a10,0,"utf-16")

Cheers.
whynotregister
Posts: 147
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 07:25

Helgef wrote:
msgbox % calc.readstring(0x2af1a10,0,"utf-8")
I do not know what this is, but maybe try msgbox % calc.readstring(0x2af1a10,0,"utf-16")

Cheers.
If the memory address is Unicode, it will be output normally, but unfortunately it is ASCII code. :sick:
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: classmemory readstring encoding error

14 Jul 2018, 08:14

Do you run your script with Unicode or ANSI build?

If you can provide a script which reproduces your problem you are more likely to receive help.

Cheers.
whynotregister
Posts: 147
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 10:25

Helgef wrote:Do you run your script with Unicode or ANSI build?

If you can provide a script which reproduces your problem you are more likely to receive help.

Cheers.
This is not difficult.

Code: Select all

calc := new _ClassMemory("ahk_exe program.exe", "", hProcessCopy)
msgbox % calc.readstring(address,0)


You can test any program. If you enter a Korea string at an empty memory address using a cheat engine and read the memory address using the classmemory, you can confirm that korea string is not normally recognized.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: drani, Freddie, gongnl, haomingchen1998, mmflume, ShatterCoder and 95 guests