Page 1 of 1
Codepage UTF8 and "read" File from Disk
Posted: Wed Jun 01, 2022 9:45 am
by AUGE_OHR
hi,
i have to use
Code: Select all
USE (cAppdir+cDBF) EXCLUSIVE VIA "DBFCDX" CODEPAGE "UTF8"
to display Filename with "German Umlaute" like City "Köln"
when try to "APPEND" from DBF it does show "Umlaute" wrong
---
when Import *.m3u File into DBF i have to use
Code: Select all
USE (cDBF) EXCLUSIVE ALIAS "IMPORT" VIA "DBFCDX"
without Codepage
but when APPEND DBF i have to use this
Code: Select all
IF USED()
CLOSE
// open without Codepage for APPEND ???
USE (cAppdir+cDBF) EXCLUSIVE VIA "DBFCDX"
APPEND FROM ( cImport )
CLOSE
// re-open with Codepage UTF8
USE (cAppdir+cDBF) EXCLUSIVE VIA "DBFCDX" CODEPAGE "UTF8"
GO TOP
DoMethod( "IPTVMAIN", "Browse_1", "refresh" )
so what do i "miss"

Re: Codepage UTF8 and "read" File from Disk
Posted: Wed Jun 01, 2022 10:48 am
by serge_girard
Jimmy,
How was DBF created?
When I dbcreate in PRG I have no problems with umlauts and french or spanish accents.
Serge
Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 2:43 am
by Claudio Ricardo
Thanks Serge... at first I put:
If ! File (Xxx.dbf)
DbCreate (Xxx....{.........}) // same with all dbf's
I had problems with the accents in the test tables (created with the IDE utility) but when delivering to the client,
so that it had empty tables, it eliminated them from the folder to be delivered, so that the program, not finding them,
would create them empty, and now there were no problems with accents or the letter Ñ... Now I understand why...
Thank you so much for clearing up the mystery!
Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 3:31 am
by AUGE_OHR
hi Serge,
serge_girard wrote: ↑Wed Jun 01, 2022 10:48 am
How was DBF created?
When I dbcreate in PRG I have no problems with umlauts and french or spanish accents.
i always create DBF "in" App ( Unicode Version ) like Claudio
---
1st. i "read" *.M3U File into DBF without any Codepage and they seem display correct in HBFM App
when open "same" DBF in IPTV i have to use Codepage UTF8 ... hm
but when have Create Empty DBF, open with Codepage UTF8, and APPEND FROM "same" DBF it display wrong
HBFM and IPTV use same "Config.INI"
Code: Select all
// setLanguage and Codepage
hb_LANGSELECT( cLANG )
hb_CDPSELECT( cLCID )
so the Question is about APPEND FROM as it have no Codepage Option.
Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 7:11 am
by gfilatov
AUGE_OHR wrote: ↑Thu Jun 02, 2022 3:31 am
...
so the Question is about APPEND FROM as it have no Codepage Option.
Hi Jimmy,
Please take a look for a correct syntax of the APPEND FROM command:
APPEND [FROM <(f)>] [FIELDS <fields,...>] ;
[FOR <for>] [WHILE <while>] [NEXT <next>] ;
[RECORD <rec>] [<rest:REST>] [ALL] [VIA <rdd>] ;
[CODEPAGE <cp>]
Hope that useful

Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 8:25 am
by AUGE_OHR
hi Grigory,
seems i have a "old" Help File
https://harbour.github.io/doc/clc53.htm ... d-from-cmd
APPEND FROM <xcFile>
[FIELDS <idField list>]
[<scope>] [WHILE <lCondition>] [FOR <lCondition>]
[SDF | DELIMITED [WITH BLANK | <xcDelimiter>] |
[VIA <xcDriver>]]
where do i find "new" Syntax
Thx, Jimmy
Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 8:53 am
by gfilatov
Jimmy,
Please click the
Harbour implementation link on the above page for recent Harbour modification.
That's all

Re: Codepage UTF8 and "read" File from Disk
Posted: Thu Jun 02, 2022 12:12 pm
by AUGE_OHR
hi Grigory,
gfilatov wrote: ↑Thu Jun 02, 2022 8:53 am
Please click the
Harbour implementation link on the above page for recent Harbour modification.
Aha
