Hi Danijel,
This is possibly due to the OEM to ANSI conversion since you are passing
FALSE in the 4th parameter of the FRead4() function. Try passing TRUE:
FRead4(nHandleImport, cBuffer, F_BLOCK, TRUE)
The same goes for FWrite4().
You may also try using FReadLine() which is not dependent upon the
status of SetAnsi(). From the VO documentation:
Sample:
ptrHandle := FOpen2("docs.txt", FO_READ)
IF ptrHandle != F_ERROR
DO WHILE !FEOF(ptrHandle)
? FReadLine(ptrHandle)
ENDDO
ENDIF
FClose(ptrHandle)
Jamal
On 8/1/2022 6:26 AM, danijel koprivnjak wrote:
Hi,
I have a request to check Romanian files (txt files),
but I have big problems with the Romanian code page
When I open the file, I can't get two characters, I can't read characters ş and ț
cBuffer := MemAlloc(F_BLOCK)
IF cBuffer = NULL_PTR
RETURN FALSE
ENDIF
nHandleImport:=FOpen2(cImportFile,FO_READ+FO_EXCLUSIVE,NULL_STRING) nHandleCheck :=FCreate( cExportFile,FC_NORMAL )
FRead4(nHandleImport, cBuffer, F_BLOCK,FALSE)
FWrite4(nHandleCheck, cBuffer,PszLen(cBuffer), FALSE)
FClose(nHandleImport)
MemFree(cBuffer)
I open the file, read it, save it and I have difference in the header and of course I don't get the above characters.
Any idea ?
many thx
Best
Danijel
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)