Question about function file

Question about function file

Postby Eroni » Wed Feb 14, 2024 10:01 pm

Hello everyone.
I am observing a difference in the behavior of the File() function when migrating from xHarbour 123 to Harbour 320:

Code: Select all  Expand view

REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850

HB_SETCODEPAGE('PT850')
HB_LANGSELECT('PT')


xHarbour 123:
-----------------      
cFile := "D:\Tmp\_Arquivos_Enviar\RELATÓRIO DE ATIVIDADES xxxx 01-01-2024 a 31-01-2024.pdf" // Name of file contains accent

? File( cFile ) // Results .T.
? File( AnsiToOem(cFile)) // Results .F.
? File(OemToAnsi(cFile))  // Results .F.
     
cFile := "D:\Tmp\_Arquivos_Enviar\RELATORIO DE ATIVIDADES xxxx 01-01-2024 a 31-01-2024 - Copia.pdf" // Name of file not contains accent
? File( cFile ) // Results .T.
? File( AnsiToOem(cFile)) // Results .T.
? File(OemToAnsi(cFile))  // Results .T.

Harbour 320:  
----------------
cFile := "D:\Tmp\_Arquivos_Enviar\RELATÓRIO DE ATIVIDADES xxxx 01-01-2024 a 31-01-2024.pdf" // Name of file contains accent

? File( cFile ) // Results .F.                 // Diference here
? File( AnsiToOem(cFile)) // Results .T.
? File(OemToAnsi(cFile))  // Results .F. // Diference here
     
cFile := "D:\Tmp\_Arquivos_Enviar\RELATORIO DE ATIVIDADES xxxx 01-01-2024 a 31-01-2024 - Copia.pdf" // Name of file not contains accent
? File( cFile ) // Results .T.
? File( AnsiToOem(cFile)) // Results .T.
? File(OemToAnsi(cFile))  // Results .T.
 


Some idea?
Regards.
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 98
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: Question about function file

Postby Enrico Maria Giordano » Thu Feb 15, 2024 9:26 am

I confirm this difference:

xHarbour:
? File( cFile ) // Results .T. This is the right one

Harbour:
? File( cFile ) // Results .F.

I have no clue about the cause, sorry. :-(
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Question about function file

Postby karinha » Thu Feb 15, 2024 12:16 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Question about function file

Postby Eroni » Mon Feb 19, 2024 9:10 pm

Enrico Maria Giordano wrote:I confirm this difference:

xHarbour:
? File( cFile ) // Results .T. This is the right one

Harbour:
? File( cFile ) // Results .F.

I have no clue about the cause, sorry. :-(

Thank you Enrico.


This is not about long names, Kapiaba.
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 98
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests

cron