Hello!
In former Versions of HMG the function 'FILE()' worked even if the filenames included blanks or umlauts.
With HMG 3.2 it does not work, this means the result is always .F. even if the file "Verbrauchsmaterial für COAGUCHECK.pdf" exists
LOCAL cFile:="Verbrauchsmaterial für COAGUCHECK.pdf"
IF FILE(cFile)
MsgInfo( cFile + " is there", Version() )
ELSE
MsgInfo( cFile + " is NOT there", Version() )
ENDIF
Maybe anyone has an idea to solve this problem?
FILE() - Problems with blanks or umlauts
Moderator: Rathinagiri
FILE() - Problems with blanks or umlauts
- Attachments
-
- krasser.zip
- (31.24 KiB) Downloaded 595 times
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: FILE() - Problems with blanks or umlauts
Hello hkrasser,
Yes, I also found problems with the umlaut, it did not happen in this version.
regards
Yes, I also found problems with the umlaut, it did not happen in this version.
regards
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
FILE() - Problems with blanks or umlauts
Hi Krasser, in first: FILE() is Harbour not HMG !hkrasser wrote:In former Versions of HMG the function 'FILE()' worked even if the filenames included blanks or umlauts.
And for me works PERFECTLY !!
I took your same code above and I compiled in CONSOLE mode (pure Harbour) and also I made in GUI and there is not problem at ALL !!!
See files attached yourself can recompile in HMG version 3.2 and see. (I also attached my exe file).
Probably my firend you are not editing in UTF-8. When I took your german phrase into the prg gave me same error than you, but I saw my editor (Notepad++) was not in UTF-8. As you should know, UNICODE is perfectly works very well with languages, but you need to write in UNICODE mode, otherwise NEVER is gonna work.
When you pass to UTF-8 mode (Encoding menu item), you will se your source code with all german accents, will be changed for strange chararcters. The please, re-type your text and save it.
Also when you use function to check if exist, copy, all these kinf of OS proposes like as: IF FILE, COPY FILE, HB_DirExists, DirMake... always IS good to put full path name too. This makes easier and safe.
- Attachments
-
- Teste70.rar
- (847.76 KiB) Downloaded 627 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: FILE() - Problems with blanks or umlauts
Hola Pablo César,
Si, efectivamente es como dices, yo lo había hecho pero no lo hice correctamente ya que hay dos menus uno dice "Codificar en UTF-8" y otro dice "Convertir en UTF-8" y debe de ser en este último. Ya que el archivo ya esta hecho!
Saludos
Si, efectivamente es como dices, yo lo había hecho pero no lo hice correctamente ya que hay dos menus uno dice "Codificar en UTF-8" y otro dice "Convertir en UTF-8" y debe de ser en este último. Ya que el archivo ya esta hecho!
Saludos
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
FILE() - Problems with blanks or umlauts
Hola Javier,
Solo tienes que ponerlo en UTF-8 como muestra la figura:
Please note, just to select in Enconding menu Item for UTF-8.
Solo tienes que ponerlo en UTF-8 como muestra la figura:
Please note, just to select in Enconding menu Item for UTF-8.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: FILE() - Problems with blanks or umlauts
Gracias Pablo César,
Ya lo compile y ya carrio!
Saludos
////////////////////////////////////////////////////////////////////////////////////////////////////////
Thanks Pablo César,
You'll compile and already carrio!
regards
Ya lo compile y ya carrio!
Saludos
////////////////////////////////////////////////////////////////////////////////////////////////////////
Thanks Pablo César,
You'll compile and already carrio!
regards