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 


Can't use the Chinese directory

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
sunsjw
How do I cheat?
Reputation: 0

Joined: 26 Jun 2012
Posts: 5

PostPosted: Fri Jun 29, 2012 11:36 pm    Post subject: Can't use the Chinese directory Reply with quote

On the Chinese directory, can not load the language file.


未标题-1.jpg
 Description:
 Filesize:  261.22 KB
 Viewed:  12319 Time(s)

未标题-1.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jun 30, 2012 11:34 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Aecial
Cheater
Reputation: 2

Joined: 27 Jun 2012
Posts: 44

PostPosted: Sat Jun 30, 2012 1:10 pm    Post subject: Reply with quote

If you wanted to waste 1000 years of your life setting it up im sure you could replicate it on VMWare.
Back to top
View user's profile Send private message
sunsjw
How do I cheat?
Reputation: 0

Joined: 26 Jun 2012
Posts: 5

PostPosted: Mon Jul 02, 2012 10:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Jul 02, 2012 3:02 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Jul 03, 2012 5:47 pm    Post subject: Reply with quote

Try this exe:
http://cheatengine.org/temp/cheatengine-i386.rar

_________________
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
sunsjw
How do I cheat?
Reputation: 0

Joined: 26 Jun 2012
Posts: 5

PostPosted: Thu Jul 12, 2012 9:59 am    Post subject: Reply with quote

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).



Windows XP Professional-2012-07-13-01-11-11副本.jpg
 Description:
 Filesize:  261.51 KB
 Viewed:  11482 Time(s)

Windows XP Professional-2012-07-13-01-11-11副本.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu Jul 12, 2012 1:20 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
sunsjw
How do I cheat?
Reputation: 0

Joined: 26 Jun 2012
Posts: 5

PostPosted: Thu Jul 12, 2012 8:13 pm    Post subject: Reply with quote

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?



未标题-1.jpg
 Description:
 Filesize:  380.47 KB
 Viewed:  11406 Time(s)

未标题-1.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu Jul 12, 2012 8:42 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu Jul 12, 2012 8:54 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
sunsjw
How do I cheat?
Reputation: 0

Joined: 26 Jun 2012
Posts: 5

PostPosted: Sat Jul 14, 2012 8:59 am    Post subject: Reply with quote

With the above version, can not be resolved. Part of the UI into Chinese.

Corred method=2



未标题-1.jpg
 Description:
 Filesize:  372.01 KB
 Viewed:  11256 Time(s)

未标题-1.jpg


Back to top
View user's profile Send private message
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