Page 1 of 1

LisDir problem

Posted: Mon Jan 08, 2018 7:25 am
by Joszif
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:

Image

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:

Image

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

Re: LisDir problem

Posted: Mon Jan 08, 2018 11:57 am
by karinha

Code: Select all | Expand


   cPath := "C:\Monitor"

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


Code: Select all | Expand


   IF .NOT. lIsDir( "C:\PDF" )
      lMkDir( UPPER( "C:\PDF" ) )
   ENDIF
 


Regards.

Re: LisDir problem

Posted: Mon Jan 08, 2018 12:00 pm
by Antonio Linares
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

Re: LisDir problem

Posted: Mon Jan 08, 2018 2:30 pm
by Joszif
Hi Antonio!

Your solution solved our problem.

Thank you.