Page 1 of 1
Getting text from an external file
Posted: Sat Apr 25, 2015 12:20 am
by keith.izatt
I have a file on an external server and when i post to it and retireive it with in my program it is not properly formatted depending on which platform I am using. If I post the file on my mac, the file reads as a single line when I retireive it and put it into a text field. When I use my PC, the text is properly formatted and shows up as it was in the initiallly. Why the difference on the two platforms. I want the text to stay as it was initially.
Re: Getting text from an external file
Posted: Sat Apr 25, 2015 10:31 am
by Mark
Hi,
I assume you don't mean "formatted" but "encoded": some characters of your text, including crlf, don't show up correctly. What is the encoding of your file?
Kind regards,
Mark
Re: Getting text from an external file
Posted: Mon Apr 27, 2015 6:29 am
by keith.izatt
what i mean is that when i upload with my mac and retrieve the data in another stack it is all one line of text.
ie. 56 45 23 67
I have to reformat the data so that word 1 is put into line 1 etc.
When i upload with my PC and then retrieve the data in another stack it appear as I need it.
56
45
23
67
It is a lot easier if the data shows up as separate lines as it is the field that I am taking the data out of originally.
I hope this makes sense.
Re: Getting text from an external file
Posted: Mon Apr 27, 2015 7:15 am
by FourthWorld
The default text mode for read/write will alter line endings to account for platform-specific differences. Try the binary form instead.