LisDir problem

Post Reply
Joszif
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am

LisDir problem

Post 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
User avatar
karinha
Posts: 7935
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: LisDir problem

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: LisDir problem

Post 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
regards, saludos

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

Re: LisDir problem

Post by Joszif »

Hi Antonio!

Your solution solved our problem.

Thank you.
Post Reply