Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13618
| From | Jamal <nospam@example.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Romania characters file open |
| Date | 2022-08-02 01:54 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tcae6q$9hs$1@gioia.aioe.org> (permalink) |
| References | <c81443f5-4144-4385-9ab2-2a7f5382a5a4n@googlegroups.com> |
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
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Romania characters file open danijel koprivnjak <danijel.koprivnjak@gmail.com> - 2022-08-01 03:26 -0700
Re: Romania characters file open dlzc <dlzc1@cox.net> - 2022-08-01 08:39 -0700
Re: Romania characters file open Jamal <nospam@example.com> - 2022-08-02 01:54 -0400
Re: Romania characters file open Phil McGuinness <mcguinnesssherlock@gmail.com> - 2022-08-03 18:39 -0700
csiph-web