Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appendig csv file in cursor
Message
De
10/05/2018 07:15:12
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/05/2018 06:55:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01659891
Message ID:
01659893
Vues:
126
>i have a csv file with accentued characters and i suppose its UTF-8 encoded.
>i create a cursor and append this csv file in it with this command:
>
>append from filename.csv type csv
>
>i have a problem wit accentued characters as : "vidéos" transformed in vfp as "vidéos"
>is there a clause i missed to have same fields? even adding codepage (as 1252) this dont solve."set nocptrans fieldname.." also dont solve the problem.

You need to use strconv() twice. Don't have an example at hand, but here's the opposite:
		lcText=STRCONV(lcText, 1)
		lcText=STRCONV(lcText, 9, nCSVCodePage,1)
So do this in opposite order and with inverse functions of 1 and 9, whatever they are. Filetostr() before and strtofile() after and you should have the csv in your codepage.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform