View previous topic :: View next topic |
Author |
Message |
sunsjw How do I cheat?
Reputation: 0
Joined: 26 Jun 2012 Posts: 5
|
Posted: Fri Jun 29, 2012 11:36 pm Post subject: Can't use the Chinese directory |
|
|
On the Chinese directory, can not load the language file.
Description: |
|
Filesize: |
261.22 KB |
Viewed: |
12319 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Sat Jun 30, 2012 11:34 am Post subject: |
|
|
I'll look into it but I can't really reproduce this. Whenever I copy/paste chines characters and make a path, it looks the same, but then ce also works fine on it. It only appears on real chinese systems
Could you post the full path so i can copy paste that? If possibly, as a raw byte array as well
_________________
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
Last edited by Dark Byte on Sat Jun 30, 2012 1:59 pm; edited 1 time in total |
|
Back to top |
|
 |
Aecial Cheater
Reputation: 2
Joined: 27 Jun 2012 Posts: 44
|
Posted: Sat Jun 30, 2012 1:10 pm Post subject: |
|
|
If you wanted to waste 1000 years of your life setting it up im sure you could replicate it on VMWare.
|
|
Back to top |
|
 |
sunsjw How do I cheat?
Reputation: 0
Joined: 26 Jun 2012 Posts: 5
|
Posted: Mon Jul 02, 2012 10:27 am Post subject: |
|
|
in function GetCEdir:string;
CheatEngineDir:=ExtractFilePath(application.ExeName);
ExtractFilePath Can not handle Chinese characters.
I think CheatEngineDir should be the UnicodeString and should not be is AnsiString
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Mon Jul 02, 2012 3:02 pm Post subject: |
|
|
The thing is that language.ini is found which also uses CheatEngineDir
Code: |
if (lang = '') and (FileExists(cheatenginedir+ 'languages' + DirectorySeparator+'language.ini')) then
begin
try
lini:=TIniFile.Create(cheatenginedir+'languages' + DirectorySeparator+'language.ini');
try
lang:=lini.ReadString('Language','PreferedLanguage','');
finally
lini.Free;
end;
except
end;
|
Seems to work for you. (QueryOpen/ CreateFile/ ReadFile/ CloseFile all success with this code)
But it looks like
Code: |
Result := cheatenginedir + 'languages' + DirectorySeparator + LangID + DirectorySeparator + 'cheatengine'+LCEXT;
if FileExistsUTF8(Result) then exit;
Result := cheatenginedir + 'languages' + DirectorySeparator + LangID + DirectorySeparator + 'cheatengine-x86_64'+LCEXT;
if FileExistsUTF8(Result) then exit;
Result := cheatenginedir + 'languages' + DirectorySeparator + LangID + DirectorySeparator + 'cheatengine-i386'+LCEXT;
if FileExistsUTF8(Result) then exit;
|
Returns false for every queryopen (the path is wrong)
If you can compile ce6.2 sourcecode, try changing "FileExistsUTF8" to "FileExists" in cetranslator.pas. Perhaps some kind of wrong conversion takes place while it's already in utf8 formatting
If you can't compile I'll put up a testversion with this change so you can test that (when I get time)
_________________
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 |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
|
Back to top |
|
 |
sunsjw How do I cheat?
Reputation: 0
Joined: 26 Jun 2012 Posts: 5
|
Posted: Thu Jul 12, 2012 9:59 am Post subject: |
|
|
The problem is still there, still can not load the Chinese language file, if the CE in the Chinese Directory.
Find the problem, the problem lies in the following piece of code, this is a track with OD code. [EBP-44] is the program's executable file path is the unicode character, [EBP-48] is an array subscript, this code is the unicode character Ascii character turn is the Chinese character error occurs . (A Chinese character is two bytes, when the switch will turn it into three bytes do not know what turned into a mess).
Description: |
|
Filesize: |
261.51 KB |
Viewed: |
11482 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Jul 12, 2012 1:20 pm Post subject: |
|
|
I have no idea where that breakpoint is and if it's one of the first tries where it tries to figure out a valid encoding.
But can you post a screenshot of that new version with filemon ? Does it still say name invalid for the queryopen of the .po files
_________________
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 |
|
 |
sunsjw How do I cheat?
Reputation: 0
Joined: 26 Jun 2012 Posts: 5
|
Posted: Thu Jul 12, 2012 8:13 pm Post subject: |
|
|
This is the new version of screenshot.
The new version fixes only the second error.The first error is not repaired.
Can you give me the debuge symbols of new version?
Description: |
|
Filesize: |
380.47 KB |
Viewed: |
11406 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Jul 12, 2012 8:42 pm Post subject: |
|
|
This exe was build without debug symbols
But the sourcecode for this part is here:
http://code.google.com/p/cheat-engine/source/browse/trunk/Cheat%20Engine/cetranslator.pas
But let's see, you didn't include the result header part, but I guess that the first queryopen for cheatengine-x86_64.po was a success
That will cause GetLocaleFileName() to return the string to that file
That returns to the caller : FindLocaleFileName(), which takes the result, sees it's not '', and thus exits the function with that result.
Returning to the caller: doTranslation()
Which then passes that string to Translations.TranslateResourceStrings() in the lcl translations.pas file (not a ce sourcecode file)
TranslateResourceStrings does a FileExistsUTF8() which fails. (If it did FileExists it would succeed)
So, I need to convert the current string, to the UTF8 format that TranslateResourceStrings probably needs
I'll do some tests and upload a test version
_________________
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 |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Jul 12, 2012 8:54 pm Post subject: |
|
|
redownload http://cheatengine.org/temp/cheatengine-i386.rar
with some luck it should popup a message saying which method of conversion was a success. (probably method 2, SysToUtf8)
_________________
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 |
|
 |
sunsjw How do I cheat?
Reputation: 0
Joined: 26 Jun 2012 Posts: 5
|
Posted: Sat Jul 14, 2012 8:59 am Post subject: |
|
|
With the above version, can not be resolved. Part of the UI into Chinese.
Corred method=2
Description: |
|
Filesize: |
372.01 KB |
Viewed: |
11256 Time(s) |

|
|
|
Back to top |
|
 |
|