Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On Key Event\Procedures
Message
De
12/03/2003 05:58:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/03/2003 13:33:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00764245
Message ID:
00764674
Vues:
22
>Refer To: When a Database File not a dbf. When the codepage header is different from the FoxPro codepage (CodePage #1252 - WINDOWS ANIS). WHEN IS OCCURS THE TABLE IS NOT A VALID FOXPRO DATABASE FILE.

Oh I never saw VFP wouldn't accept a dbf as not valid when codepage info is missing or wrong. It's only a setting byte in header (offset 29). It doesn't matter you have 0 or 255 there (from not a valid dbf POV). And more if that setting is different from Foxpro current codepage it serves as a translator. ie: All my fox2x DOS tables have that set as 857-DOS Turkish CP. But my windows setting might be 1254 (Turkish Windows ANSI CP) and I can see specific Turkish letters correctly converted to Windows counterparts and any edit in Windows, then reopen in DOS I still have them with correct letters. If say I had windows CP set as 1252 all I lose is the display of letters but table is there as a valid dbf.
If a table has no codepage info (byte offset 29 is 0) and you open it VFP just asks as it's not marked and if you want to mark it with a CP.
Either use cpzero.prg or a little lowlevel IO prg to poke your CP once to tables on startup if not set yet? You can find what byte to put there examining cpzero.prg.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform