FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error special Filename characters
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
error special Filename characters
Posted: Mon Jun 11, 2012 10:58 PM
With las version of HARBUR (BCC, MVC & MINGW) when using special characters to create filenames all special are changed and get error when try to open because special characters changed, i return to previus version of HARBOUR 7025 for Bcc y Mvc y 17003 for mingw

Example:

Code (fw): Select all Collapse
     cFilename :="PÓLIZA DIRECTORES Y ADMINISTRADORES.pdf"

      oQryFind = TDolphinQry():New( "select file from files where id=" + ClipValue2Sql( uValue ), oQry:oServer )

      nHandle := FCreate( cFilename  )

      IF FError() # 0
         MsgInfo( "Error grabando Archivo " + AllTrim( cfilename ) )
         RETURN
      ENDIF

      FWrite( nHandle, oQryFind:file, Len( oQryFind:file ) )
      FClose( nHandle )

     // memowrite( cFilename, oQryFind:file )   // Same error 

      ShellExecute(,"Open","'"+cFilename+"'",,,3) // can't not open file because created filename have changed characters



Created name is "P╙LIZA DIRECTORES Y ADMINISTRADORES.pdf" where Ó is changed for ╙ and same is for all branded characters and Ñ y ñ.

Please notify to harbour team to review.


Slds,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: error special Filename characters
Posted: Tue Jun 19, 2012 02:15 AM

I found answer in harbour groups, to use special spanish characters in filenames see example, codepage default behavior has been changed in lastest versions.

REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ESWIN

Function Main()

SET( _SET_CODEPAGE, "ESWIN" )
...
...

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com

Continue the discussion