Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lose small sqaure at end of text file
Message
From
14/05/2009 01:51:45
 
 
To
14/05/2009 01:20:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01399805
Message ID:
01399809
Views:
85
>Anyone know how to get rid of the small square that appears at the end of each and every text file?
>
>k
>
>set alte to sample.txt
>set alte on
>? "this is a sample of the text."
>close alte
>
>modi file sample.txt
>voila:
>
>This is a sample of the text
* You can use Asc() to determine the unknown byte: 
? ASC(RIGHT(FILETOSTR('sample.txt'),1)) && says 26
* so you can use StrTran() or ChrTran() together with FileToStr/StrToFile() to get rid of the Chr(26)
? ASC(RIGHT(STRTRAN(FILETOSTR('sample.txt'),CHR(26)),1))

* Or use Text/EndText instead of Set Alternate:
Local lcContent
TEXT TO lcContent NOSHOW
this is a sample of the text.
ENDTEXT
STRTOFILE(m.lcContent,'sample2.txt')
? ASC(RIGHT(FILETOSTR('sample2.txt'),1))
hth
-Stefan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform