Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Codepage conversion (PRG)
Message
De
28/04/2016 19:31:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/04/2016 08:47:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01635551
Message ID:
01635593
Vues:
76
>For one client, I need to convert FoxPro to Visual FoxPro. For now, I won't be making a major redesign - just checking for compatibility and aesthetics.
>
>Some special characters are output to the screen, for borders, lines, and such; how do I convert that? If I open the program with:
>
>MODIFY COMMAND abc.prg AS 850 && or some similar codepage
>
>I see the characters correctly, but what do I do next? Just "Save as..."?

Codepage is in the eye of the beholder, i.e. the compiler. The 850 is the DOS codepage for, IIRC, Latin1 (i.e. western extended). Here's what I used in the similar scenario with the corresponding pair of codepages for central european codepages:

Strtofile(Cpconv(852, 1250, Filetostr(fajl)),fajl)

I guess you'd have 850 and 1252 for western, or 855 and 1251 for cyrillic etc. In my case I was overwriting a copy of the file (the original being safely stored elsewhere).

What I said about the compiler - it may translate a character string properly between 850 and 1252, and display it correctly, but a variable containing one of the converted characters in its name may not be recognized outside of that prg, so it's far better that all the files in a project be of the same codepage. It also slows building the project a lot if they aren't.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform