Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filetostr() problem
Message
De
12/01/2010 08:00:51
 
 
À
12/01/2010 07:50:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01443384
Message ID:
01443385
Vues:
73
>Hi all,
>
>i have a text/xml document and with filetostr() i'm importing it into vfp. There is one problem : i'm my text file there are 'strange' characters like '&' and they need to stay like that. When i look into the imported string the '&' has changed into 'amp|,'
>
>Does somebody has a clue how to solve this problem ?
>
>thnx

Actually it's the other way around, your XML contains the strange characters which are converted by the program you use to watch the XML. You can use STRTRAN() to convert these "chain of characters" into real characters. This is a function to create these XML (and HTML) characters, you can simply reverse the expressions to get what you want.
Function txt2html
LPARAMETER lcHTML

lcHTML = STRTRAN(lcHTML,"<","&lt;")
lcHTML = STRTRAN(lcHTML,">","&gt;")
lcHTML = STRTRAN(lcHTML,["],"&quot;")
lcHTML = STRTRAN(lcHTML,[& ],"&amp;")

RETURN lcHTML
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform