Carriage returns over Internet

[code] strPath = “&intParentID=” + str(F0_intCountryID) _

  • “&strName=” + encodeURLComponent(F2_txtTitle.Text) _
  • “&strText=” + encodeURLComponent(F2_txtContent.Text) _
  • “&userID=” + str(F0_intWeb1UserID) _
  • “&strUserName=” + encodeURLComponent(F0_strUserName)

DIM strSearchString as String = [ url + some other] + strPath

System.DebugLog strSearchString

DIM http as New HTTPSocket
http.Yield = TRUE

DIM strPage As String = http.Get(strSearchString , 30)

’ strPage = DefineEncoding(strPage, Encodings.UTF8 )
’ strPage = Trim(strPage)

MsgBox strPage[/code]
+ “&strText=” + encodeURLComponent(F2_txtContent.Text)

This one seem not to work with carriage returns! What could be the issue? How can I solve it!?
I’m out of ideas…

Try to replace CR with %0D in the URL

On OS X 10.9 using 2015r2.4

  dim F2_txtContentText as string = "123" + EndOfLine + "123"
  dim strPath as string = "&strText=" + encodeURLComponent(F2_txtContentText) 

strPath contains



  dim F2_txtContentText as string = "123" + EndOfLine.Macintosh + "123"
  dim strPath as string = "&strText=" + encodeURLComponent(F2_txtContentText) 

strPath contains




OK, that seems to work! No error at that point!

I use Classic ASP to show the content.
response.write "Content: " & replace(myRow(4,i), vbCRLF , “
” & vbCRLF)

Content: content content content

Replace seem not to work in this case, on the web.
But at the other hand! The purpose is not to use the data, the information, in the web format… (in ASP) At least not in this case.
However, in other situations it might be such situation.

In this case, the data shall be read from within the Xojo standalone application.
Maybe it works when the data is again returned to the Xojo application?
I shall make the test, to see if it works!

There are many components and different aspects to take care of!

%0D is not vbCRLF
vbCRLF is CR + LF

%0D is CR only

response.write "Content: " & replace(myRow(4,i), chr(13), "<BR>" & vbCRLF)

Thank you for inspiration!

It’s easy when you know how! :slight_smile: