Author Topic: fbap (u3) Unicode get error under CWin ?  (Read 5743 times)

Offline Leaf

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +9/-4
fbap (u3) Unicode get error under CWin ?
« on: August 13, 2005, 07:39:46 AM »
I use CWinXP. If you have config file "fbap.ini", fbap.exe will exit.
I found it breaked at first call _fgetts() here, but I don't know why..:

// Go through each line of the config file
while (_fgetts(szLine, sizeof(szLine), h)) {
...
}

find this in int ConfigAppLoad();
#if defined (_UNICODE)
   if (setlocale(LC_ALL, ("Chinese_China"))) {
      if ((h = _tfopen(szConfig, _T("rb"))) == NULL) {
         return 1;
      }
if I change _T("rb") to _T("rt") then it works well.

This code is to fix chinese directory? http://neo-source.com/index.php?topic=314.0
(sorry for my poor english. ^^)
« Last Edit: August 13, 2005, 07:41:08 AM by Leaf »

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Re: fbap (u3) Unicode get error under CWin ?
« Reply #1 on: August 15, 2005, 10:28:23 PM »
I use CWinXP. If you have config file "fbap.ini", fbap.exe will exit.
I found it breaked at first call _fgetts() here, but I don't know why..:

// Go through each line of the config file
while (_fgetts(szLine, sizeof(szLine), h)) {
...
}

find this in int ConfigAppLoad();
#if defined (_UNICODE)
   if (setlocale(LC_ALL, ("Chinese_China"))) {
      if ((h = _tfopen(szConfig, _T("rb"))) == NULL) {
         return 1;
      }
if I change _T("rb") to _T("rt") then it works well.

This code is to fix chinese directory? http://neo-source.com/index.php?topic=314.0
(sorry for my poor english. ^^)
That was supposed to be for chinesse directories, i made a case so if you have a "latin" windows you don't have problems with that... is weird that you have problems i use winME and i've tested that on winXP and that error doesn't happen, maybe you need to use a new ini, delete the actual (keep a backup) and reconfigure, that should work
See ya!!!!! :biggrin:

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline Leaf

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +9/-4
Re: fbap (u3) Unicode get error under CWin ?
« Reply #2 on: August 17, 2005, 08:39:59 AM »
Thank u, FerchogtX.
It works ok if u first run it (because there is no config.ini), but it will crash when u run it next time.
And I found it couldn't run at Japanese OS (Jwin2000 or JWinXP) because the same problem..

Offline osv29

  • New Member
  • *
  • Posts: 5
  • Karma: +0/-0
  • Junior Member
Re: fbap (u3) Unicode get error under CWin ?
« Reply #3 on: August 17, 2005, 08:17:57 PM »
i have the same problem and i tested under a spanish and english versions of winXP ...this bug only happens when an unicode build is done...and run once but when i try to open fbap again it will crash...