Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double spacing problem
Message
From
27/09/2015 14:33:21
 
 
To
27/09/2015 01:27:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01625127
Message ID:
01625130
Views:
76
This message has been marked as the solution to the initial question of the thread.
>i have downloaded an HTML file which i need to import into a table.
>
>when i see it in Notepad++ it shows up very clearly with a total of 27614 lines
>
>however when i import it into my table
>
>
>
>append from 1.htm type sdf
>
>
>
>everything is double spaced and the number of lines doubles also

The HTML file probably isn't ASCII, it's probably encoded as UTF-8 or maybe Unicode.

You can convert it to something VFP can import:
lcMemVar = FILETOSTR( "MyHTMLFile.html" )
lcASCIIMemVar = STRCONV( lcMemVar, {flags} )
* You'll have to experiment with {flags}
* If it's UTF-8 you may have to first convert from UTF-8 to double byte (11),
* then double-byte to single-byte (2)

* Write it back out to an ASCII file:
=STRTOFILE( lcASCIIMemVar, "MyASCIIFileName.txt" )

* Then do your APPEND
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform