LisDir problem

LisDir problem

Postby Joszif » Mon Jan 08, 2018 7: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:

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
Joszif
 
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am

Re: LisDir problem

Postby karinha » Mon Jan 08, 2018 11:57 am

Code: Select all  Expand view

   cPath := "C:\Monitor"

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


Code: Select all  Expand view

   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
karinha
 
Posts: 7813
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: LisDir problem

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: LisDir problem

Postby Joszif » Mon Jan 08, 2018 2:30 pm

Hi Antonio!

Your solution solved our problem.

Thank you.
Joszif
 
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 99 guests