I have taken the liberty of adding the hooks for Delphi XE. It seems to work, and I will update if I find any issues. This is just because I still need this component and want to help others. If I have done wrong, please let me know, and I will remove the file. It would be great, however, if this could become a TDbf7xx release. I do see a lot of searches done for this component still.
Glad to be of service. I had planned on moving away from this component, but it was just too handy to dispense with. Hopefully the tDBF admin can put a new download up on both the SF and tDBF pages.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Внес это исправление, но у меня DBF все равно открывается кракозябрами. Пробовал открыть справочник банков, можно взять на Pvision.ru и пробовал открыть КЛАДР можно взять на www.nalogy.ru помогите пожалуйста.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I´ve changed a part in TDBF, because I have some tbf Files with incorret Codepage oder Header. To open this files i´ve added following code in
dbf_lang.pas
function GetLangId_From_LangName(LocaleStr: AnsiString): Byte;
….
@@ Line 626 @@
<CODE>
// convert codepage string to codepage id
if CodePageStr = 'WIN' then
CodePage := 1252
else if CodePageStr = 'REW' then // hebrew
CodePage := 1255
else
Try // +Miggi
CodePage := StrToInt(String(CodePageStr));
except // + Miggi
CodePage := 0; // +Miggi
End; // + Miggi
// find lang id
</CODE>
The result is, that the tDBF component choose the system default codepage.. otherwise the tDBF closed with an "" error.
I´ve checked this change with several dbf-file formats
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Я послал письмо забросившему проект админу, но не уверен что ответит. Или здесь как-то можно стать мантейнером проекта и без авторского благословления?
вот такое вот письмо на mdv@users.sourceforge.net послал:
"Whould You like add me to tDBF project supporters?
And by that - if he'd not answer you, perhaps you'd just open ticket in bug-tracker with your request.
Actually i probably still have SVN access, but i am definitely not project admin.
Well, if nothing works, you at least ca nfor it or ask SF administration for their judgement.
BTW, since SF now actively obsoleting their current SVN back-end - they just should have all admins active and perhaps Micha would gladly gave the steering wheel to someone else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, Rich here from SourceForge. I've just been pointed to this thread, and I'd be glad to do what's necessary to give privileges to whoever needs it, in order to keep this project afloat. Investigating further.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Adding modified Michael Hummel 2012-11-14 fix to the FPC TDBF code.
Currently fixing up FPC TDBF code (separating out FoxPro from Visual Foxpro, fixing VFP character set issues), writing unit tests, validating against them. When that is done, I'll coordinate with Nashev to get those changes in trunk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the mean time I found more potential problems and I decided to make the use of AnsiStrings more consistently for Delphi 2009 and up. I also created the required packages for Delphi XE2. For this, I used the above-mentioned TDbf_Delphi_XE1_v1.zip to create http://lploeger.home.xs4all.nl/TDbf_Delphi_XE2_v1.zip. The original tdbf690.zip is also merged in. I hope nobody feels offended, otherwise I will remove the ZIP file immediately.
Last edit: LS Ploeger 2013-05-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks to Vern Baker & Ls Ploeger for update to XE1 and XE2 , because it is a big incompatibility from Delphi5/6/7 going to XE , because CHAR (One byte) is now identical to WIDECHAR (Two bytes caracter international) ; many - many lines of code to modify !
But I jump directly from DELPHI5 (v7 is the better product I know) to XE7 (Delphi Starter Edition New user, it is at a little price in November 2014, 290€ in France with VAT)
I use TDBF6.90 for ten years for applications in my little enterprise.
But now, news problems with Ploeger XE2 come with XE7, perhaps 3 hours to correct this :, because XE7 is very - very strict language :
1) array of bytes // constant char , as in : FloatRec.Digits[I+1] = #0 ; ==> convert to 00
2) PBYTE incompatible with NATIVEINT , as in : Result := CalcBuffer ===> convert to ptr(CalcBuffer)
3) define version of XE7 (probably VER280 , because XE6 is VER270)
4) and the last, but stupid : Twenty ordinary constants are now in unit FORMATSETTINGS , as DecimalSeparator :
my_Char := DecimalSeparator ==> correct to
System.SysUtils.FormatSettings.DecimalSeparator
or to AnsiChar(System.SysUtils.FormatSettings.DecimalSeparator) if ONE byte result.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are welcome. I did not check all functionality (e.g. writing), but for my purposes it does the job. If you need to contact me you can find my e-mail address in the readme.txt file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
//==========
function FindLangId(CodePage, Info2: Cardinal; Info2Table: PCardinal; IsFoxPro: Boolean): Byte;
var
I, Region, FoxRes, DbfRes: Integer;
begin
Region := 0;
DbfRes := 0;
FoxRes := 0;
// scan
for I := 0 to $FF do
begin
// check if need to advance to next region
if Region + 2 < dBase_RegionCount then
if I >= dBase_Regions[Region + 2] then
Inc(Region, 2);
// it seems delphi does not properly understand pointers?
// what a mess :-(
end;
// if we can find langid in other set, use it
if (DbfRes <> 0) and (not IsFoxPro or (FoxRes = 0)) then
Result := DbfRes
else {(DbfRes = 0) or (IsFoxPro and (FoxRes <> 0)}
if (FoxRes <> 0) {and (IsFoxPro or (DbfRes = 0)} then
Result := FoxRes
else
Result := 0;
end;
//========== it works
Last edit: VoLT 2013-05-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have taken the liberty of adding the hooks for Delphi XE. It seems to work, and I will update if I find any issues. This is just because I still need this component and want to help others. If I have done wrong, please let me know, and I will remove the file. It would be great, however, if this could become a TDbf7xx release. I do see a lot of searches done for this component still.
http://teleflow.org/software/opensource/tdbf/TDbf_Delphi_XE_v1.zip
Thanks, good timing and very useful.
Glad to be of service. I had planned on moving away from this component, but it was just too handy to dispense with. Hopefully the tDBF admin can put a new download up on both the SF and tDBF pages.
What versin in a base of You fixes?
6.9.1?
В версии TDbf_Delphi_XE_v1 ошибка при преобразовании кодировки - неправльно делается type cast
Patch:
Index: dbf_common.pas
-- dbf_common.pas
+++ dbf_common.pas
@@ -412,8 +412,8 @@
Result := Length;
if (FromCP = GetOEMCP) and (ToCP = GetACP) then
begin
- {$IFDEF DELPHI_2009} // Rafal Chlopek (14-03-2010): I've commented DELPHI_2010
- OemToCharBuff(Src, PChar(Dest), Length)
+ {$IFDEF DELPHI_2009}
+ OemToCharBuffA(Src, Dest, Length);
{$ELSE}
OemToCharBuff(Src, Dest, Length)
{$ENDIF}
@@ -422,7 +422,7 @@
if (FromCP = GetACP) and (ToCP = GetOEMCP) then
begin
{$IFDEF DELPHI_2009}
- CharToOemBuff(PChar(Src), Dest, Length)
+ CharToOemBuffA(Src, Dest, Length)
{$ELSE}
CharToOemBuff(Src, Dest, Length)
{$ENDIF}
Внес это исправление, но у меня DBF все равно открывается кракозябрами. Пробовал открыть справочник банков, можно взять на Pvision.ru и пробовал открыть КЛАДР можно взять на www.nalogy.ru помогите пожалуйста.
поройся вокруг, может его уже кто-то конвертитровал.
покрайней мере пару лет назад был справочник городов, улиц и т.п.
его быстро перенесли в Firebird
Anyone done it to XE2? Just too useful to waste…
@all
I´ve changed a part in TDBF, because I have some tbf Files with incorret Codepage oder Header. To open this files i´ve added following code in
dbf_lang.pas
function GetLangId_From_LangName(LocaleStr: AnsiString): Byte;
….
@@ Line 626 @@
<CODE>
// convert codepage string to codepage id
if CodePageStr = 'WIN' then
CodePage := 1252
else if CodePageStr = 'REW' then // hebrew
CodePage := 1255
else
Try // +Miggi
CodePage := StrToInt(String(CodePageStr));
except // + Miggi
CodePage := 0; // +Miggi
End; // + Miggi
// find lang id
</CODE>
The result is, that the tDBF component choose the system default codepage.. otherwise the tDBF closed with an "" error.
I´ve checked this change with several dbf-file formats
Michael
Guys, let some of you just overtake the project and go on maintaining it ?
I did not worked with DBF for years. All other original developers seems quit ISAM too.
This project is abandonware, choosing between bit decayand SourceForge dead projects pruning.
Well, there are memDBf and VK-DBF, so perhaps you'd better switch from TDbf and admit its death.
Or please re-take it and continue its life.
arioch_bdv, I do not know what to do, but I've usiing this component on my job and can put here any suggested updates time to time.
i believe you'd then better re-take this project and became its maintainer since then. How would you like it ?
Я послал письмо забросившему проект админу, но не уверен что ответит. Или здесь как-то можно стать мантейнером проекта и без авторского благословления?
вот такое вот письмо на mdv@users.sourceforge.net послал:
"Whould You like add me to tDBF project supporters?
I will post to SVN changes, which are in
https://sourceforge.net/projects/tdbf/forums/forum/107245/topic/4031518 topic are
suggested and so on"
Увидим. Я был уверен, что он давно сбежал.
But it stil lappears Micha is floating around and at least to some degree does care.
See his reply is rather fresh one https://sourceforge.net/tracker/index.php?func=detail&aid=3586166&group_id=34085&atid=410671
And by that - if he'd not answer you, perhaps you'd just open ticket in bug-tracker with your request.
Actually i probably still have SVN access, but i am definitely not project admin.
Well, if nothing works, you at least ca nfor it or ask SF administration for their judgement.
BTW, since SF now actively obsoleting their current SVN back-end - they just should have all admins active and perhaps Micha would gladly gave the steering wheel to someone else.
Micha Nelissen also floated arounf FreePascal - http://wiki.freepascal.org/index.php?limit=50&tagFilter=&title=Special%3AContributions&contribs=user&target=Neli&namespace=&year=&month=-1
And maybe in cygwin areas as well
Though it was rather faraway days - 2007 - so he probably is not activwe there now
Hey, Rich here from SourceForge. I've just been pointed to this thread, and I'd be glad to do what's necessary to give privileges to whoever needs it, in order to keep this project afloat. Investigating further.
Ok, give it for me
Поздравляю.
Если не будешь переводить на git, то IMHO http://sourceforge.net/users/mhummel68/ and http://sourceforge.net/users/vernbaker/ are worth SVN commit grants, so you can merge or cherry-pick from their branches.
Adding modified Michael Hummel 2012-11-14 fix to the FPC TDBF code.
Currently fixing up FPC TDBF code (separating out FoxPro from Visual Foxpro, fixing VFP character set issues), writing unit tests, validating against them. When that is done, I'll coordinate with Nashev to get those changes in trunk.
I don't know where to find the latest version, but I wanted to report there is a bug in the function MemComp() (dbf_idxfile.pas) for D2009 and up for http://teleflow.org/software/opensource/tdbf/TDbf_Delphi_XE_v1.zip.
The problem sits here:
Where it should be:
Because of this bug, the Locate() function does not work. With my proposed code change it works OK.
I hope this is useful to anyone.
In the mean time I found more potential problems and I decided to make the use of AnsiStrings more consistently for Delphi 2009 and up. I also created the required packages for Delphi XE2. For this, I used the above-mentioned TDbf_Delphi_XE1_v1.zip to create http://lploeger.home.xs4all.nl/TDbf_Delphi_XE2_v1.zip. The original tdbf690.zip is also merged in. I hope nobody feels offended, otherwise I will remove the ZIP file immediately.
Last edit: LS Ploeger 2013-05-29
I think, we must say Thank You very much!
thanks to Vern Baker & Ls Ploeger for update to XE1 and XE2 , because it is a big incompatibility from Delphi5/6/7 going to XE , because CHAR (One byte) is now identical to WIDECHAR (Two bytes caracter international) ; many - many lines of code to modify !
But I jump directly from DELPHI5 (v7 is the better product I know) to XE7 (Delphi Starter Edition New user, it is at a little price in November 2014, 290€ in France with VAT)
I use TDBF6.90 for ten years for applications in my little enterprise.
But now, news problems with Ploeger XE2 come with XE7, perhaps 3 hours to correct this :, because XE7 is very - very strict language :
1) array of bytes // constant char , as in : FloatRec.Digits[I+1] = #0 ; ==> convert to 00
2) PBYTE incompatible with NATIVEINT , as in : Result := CalcBuffer ===> convert to ptr(CalcBuffer)
3) define version of XE7 (probably VER280 , because XE6 is VER270)
4) and the last, but stupid : Twenty ordinary constants are now in unit FORMATSETTINGS , as DecimalSeparator :
my_Char := DecimalSeparator ==> correct to
System.SysUtils.FormatSettings.DecimalSeparator
or to AnsiChar(System.SysUtils.FormatSettings.DecimalSeparator) if ONE byte result.
You are welcome. I did not check all functionality (e.g. writing), but for my purposes it does the job. If you need to contact me you can find my e-mail address in the readme.txt file.
Ошибка была в dbf_lang.pas
//==========
function FindLangId(CodePage, Info2: Cardinal; Info2Table: PCardinal; IsFoxPro: Boolean): Byte;
var
I, Region, FoxRes, DbfRes: Integer;
begin
Region := 0;
DbfRes := 0;
FoxRes := 0;
// scan
for I := 0 to $FF do
begin
// check if need to advance to next region
if Region + 2 < dBase_RegionCount then
if I >= dBase_Regions[Region + 2] then
Inc(Region, 2);
// it seems delphi does not properly understand pointers?
// what a mess :-(
end;
// if we can find langid in other set, use it
if (DbfRes <> 0) and (not IsFoxPro or (FoxRes = 0)) then
Result := DbfRes
else {(DbfRes = 0) or (IsFoxPro and (FoxRes <> 0)}
if (FoxRes <> 0) {and (IsFoxPro or (DbfRes = 0)} then
Result := FoxRes
else
Result := 0;
end;
//========== it works
Last edit: VoLT 2013-05-31