Unfortunately, I already tried setting FoxLangId_EEurope_1250 earlier and that doesn't help. It's not a code page problem, it's a sorting problem. TDbf correctly recognizes code page 1250 and correctly writes and reads specific Croatian characters (which, by the way, are not the same as in the Czech language), but does not know how to sort them.
Regards, Paul. Is there any news concerning the problem with string sorting with locale 1050?
All right, Paul, thanks, I appreciate that.
This happens when a Form is created even though the TDbf component was not created at all. Function ConstructLangId calls function FindLangId twice: first with CodePage, then without. In first run: function FindLangId CodePage = 1250 Info2 = 1050 Info2Table = $66D3DC IsFoxPro = false after loop for I := 0 to $FF - Region = 2 - DbfRes = 0 - FoxRes = 0 finally: Result = 0 In second run result is the same. Obviously function can't find LangId with Locale = 1050.
GetACP() returns ANSI codepage 1250 as it schould be. When I create and open dbf, both with the old and with the new TDbf, TDbf.CodePage returns 1250. Dbf-dbffile.pas contains the property DbfGlobals.DefaultCreateLangId. This reads the FDefaultCreateLangId that should be formed in TDbfGlobals.Create, but is not formed then but in the SetDefaultCreateCodePage procedure. It is formed by the CostructLangId function from the dbf_lang unit. However, at the moment I do not see what and when is calling...
with exe
without exe
Regards, Paul, attached is a ZIP file with a program that creates a table and fills it with a series of strings that use specific characters of my language. Such a table is also proba4.dbf with indexes in the proba4.mdx file. You can create a new table and load it by clicking on bFillData with the same data. My Windows is set to Croatian language (HRV code). GetUserDefaultLCID() returns 1050. When creating dbf, codepage is automatically set to 1250. A strange code DB0 is written under the language,...
Yes, its happen with revision I downloaded on 2022-02-17. In ZIP attachment you can find code and two examples. One - test.dbf - is created and filled with very old version and Delphi 2007, and works correct. Set the index and I hope you will see the right order. Another - proba3.dbf - is created and filled with recent TDbf and Delphi 10.2. The codepage 1250 appears as default. In my language the alphabetic order is AaBbCcČčĆćDdĐđEeFfGgHhIiJjKkLlMmNnOoPpRrSsŠšTtUuVvXxYyZzŽž.
Indexing string with codepage 1250
Update: if I open dbf and mdx that were created and loaded with the old version, the string indexes in the new version work correctly. The problem arises when I create table and indexes in new version.
Hey! I have been using TDbf 6.4.7 with Delphi 2007 for years and have not had any problems with code page 1250 i.e. with indexing strings that contained special characters from my language. Of course, TDbf 6.4.7 does not work with unicode versions of Delphi. Now I have tried this latest version with Delphi 10.2, everything works except indexing. The string index does not recognize the order of the characters in my language, so it puts special characters at the end. Am I doing something wrong? Is...
Suppose you have existing table Dbf1. This is the procedure in short: var dbff : TDbfFieldDefs; Dbf1.Open; dbff.Assign(Dbf1.DbfFieldDefs); ft := TFieldType(leType.Tag); dbff.Add(leFieldName.Text,ft,len); Dbf1.Close; Dbf1.RestructureTable(dbff,true); Dbf1.Open; I was using such procedure for years with old version 6.4.7 of TDbf in D2007.
Restructure bug?
I have just installed the version 7.0.2 on the Delphi 10.2, Windows 7 Pro. For compiling and installing the component I use Delphi102 package. It works, but ... After compiling the component, all dcu files are stored there in the /dcu folder. But when I compile an application, the same set of dcu files are stored in the Debug or Release folder where the exe is compiled. What should I change to use allready compiled DCU units in the /dcu folder?
Does somebody solve the problem? As I understand, the problem arises only for Win1250...
Dis somebody solve the problem? As I understand, the problem arises only for Win1250...
Have the same problem with Delphi 10 Seattle, but with settings Croatian (Croatia)....
Have the same problem with Delphi 10 Seattle, but with settings Croatian (Croatia)....
Have the same problem with Delphi 10 Seattle, but with settings Coatian (Croatia)....