Try again.
In my app, I save text from a multi-line textarea to an SQLite database.
When I retrieve the data to a multi-line textarea on Android the text breaks where there are CR/LFs.
Text saved and retrieved on iPhones does not save the line breaks. The text is all returned as a run-on sentence.
I am NOT saving HTML text; just straight ASCII.
My question is, how do I insert CRs or LFs or both on an iPhone so that the text displays as it was saved?
User type in the textArea(BS) and the ‘value’ is stored in the database.
dbField=txtArea.value
When I retrieve the data, it displays properly when assigned as follows:
txtArea.value= dbField
Except on an iPhone
The text has 0 or more CR/LFs. The CR/LFs do not display on an iPhone.
The line separator is there in Windows and on the Android. I save many paragraphs of data containing line separator in the database and there is no problem retrieving and displaying the data, with all the line separators in place, on an Android phone.
The problem is that the iPhone ignores the line separator in the retrieved data.
I have a multi-lined Bootstrap TextArea in my app. I enter random data including carriage returns and line feeds as one normally does in a multi-line text box.
I retrieve the data back into the same TextArea at a later date.
The carriage returns and line feeds are still there: on the Android phone.
On the iPhone, the carriage returns and line feeds do not exist.
When retrieving the data, I have tried to replace the vbCRLF in the text with vbCR, “\n”, “\n”, “\r\n”, “\U2028”, “\U+2028”, etc. Before assigning it to the TextArea.value. It does not work
I have been trying that and similar statements on the iPhone for 3 months and it does not work.
Did you save the TextArea.value, with all it’s CR/LFs to an SQLite database and then retrieve it back into the TextArea.value? It comes back from the database with all the original CR/LFs . Works in Windows, Android and even Blackberry; but not the iPhone.
There is a problem in the way the TextArea is implemented either in NS Basic or in Bootstrap for the iPhone.
Thank you. I didn’t notice anywhere where you said it worked.
The sample has exactly this statement in it:
Textarea1.value="George" & vbCR & "henne"
This tells me that Textinput is working fine, and that the problem is in the database. I don’t know of any problems saving data in iPhone databases - it’s the same code as in Chrome. They both use the same underlying WebKit library. I suspect there is a problem with the data going into the database.