Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Look embedded carriage returns in text file?
Message
 
À
11/07/2013 22:24:31
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01578248
Message ID:
01578250
Vues:
56
Good question I had not thought of that.

This is kind of the direction I was going with it...
lnFileHandle = FOPEN(mytFileName.Value, 0)
lnFileSize = FSEEK(lnFileHandle,0 ,2)

FOR lnPointerLocation = 1 TO lnFileSize
lnSeekedSpot = FSEEK(lnFileHandle, lnPointerLocation, 0)
lcCharacter = FREAD(lnFineHandle, 1)

lnANSIvalue = ASC(lcCharacter)
EndFor

....then I was going to see if lnANSI value is a carriage return or line feed or tab - I just need to find out what ANSI values those are ...assume I'm even on the right path here...haha)


>JAG Does the have Tab characters embedded?
>
>>I'm creating a text file which is basically an export of some data.
>>
>>The problem I seem to be having is that when the guy who's using this file tries to import it, he's saying that I must have some embedded carriage returns in some of the lines. Of course I open the file with wordpad or ultraedit or whatever I don't see that problem. However before I say "I don't think so" I want to be sure this isn't happening. Perhaps one of the data-fields I'm grabbing has this in it.
>>
>>So here is my question. How can I look through a text file with VFP and search for carriage returns, line feeds, or whatever else might cause this?
>>
>>Thanks!
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform