FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour LisDir problem
Posts: 5
Joined: Sat Jan 06, 2018 11:58 AM

LisDir problem

Posted: Mon Jan 08, 2018 07:25 AM
Hi!

In the newest FWH(17.11) and Harbour(3.2) I have a problem with the LisDir() and Directory() functions.

My problem is the following:

I use Hungarian characters (for example: é, á, í, ő, …etc.).

If I use the new LisDir(“C:\é”), the function return false, incorrectly,
and the Directory() function returns the following array:



With the old FWH(7.09) and Harbour(1.0.1) the LisDir(“C:\é”) works correctly (returns true),
and Directory() function returns the following array:



The second picture shows the real, valid file and directory names.

We have found an alternative version of LisDir() function (LisDirW()), but we still have the previous problem with the Directory() function.

Can you help me please, what is the solution?

Thank you.

Joszif
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM

Re: LisDir problem

Posted: Mon Jan 08, 2018 11:57 AM
Code (fw): Select all Collapse
   cPath := "C:\Monitor"

   IF ! lIsDir(cPath)
      MsgInfo("Monitor Not Instaled", "Warning")
      RETURN(.F.)
   ENDIF


Code (fw): Select all Collapse
   IF .NOT. lIsDir( "C:\PDF" )
      lMkDir( UPPER( "C:\PDF" ) )
   ENDIF


Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: LisDir problem

Posted: Mon Jan 08, 2018 12:00 PM
Are you using the Hungarian codepage from your app ?

FW_SetUnicode( .T. )
HB_CDPSELECT( "HUWIN" )
HB_SETCODEPAGE( "UTF8" )

http://harbourlanguage.blogspot.com.es/2010/06/harbour-codepage.html
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 5
Joined: Sat Jan 06, 2018 11:58 AM

Re: LisDir problem

Posted: Mon Jan 08, 2018 02:30 PM

Hi Antonio!

Your solution solved our problem.

Thank you.

Continue the discussion