Log in

No account? Create an account
help needed from VB smart people - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

help needed from VB smart people [Mar. 9th, 2003|03:37 pm]
LiveJournal Client Discussions


[mood |frustratedfrustrated]
[music |sound of pissed....]

yes i have a rather odd problem....

whenever i go to make a linedrop like hit enter or something to make a new line, it gives me A%D%A%D% however many times i do it, and worst of all, it doesnt go down at all, it stays as one big string. PLEASE HELP! so close to having it be perfect..please post comments on how to fix.

[User Picture]From: mattlyle
2003-03-09 09:02 pm (UTC)
this has to do with a line break and how it is translated into hexidecimal. a line break is really a 10 followed by a 13 in the ascii markup... so like where an uppercase A is 65, the line break is really those 2 next to each other, at least in windows, where in mac it's one and unix it's the other if i remember correctly.

so to fix just go through the string, and replace that pattern with what you want it to be, a normal newline...
(Reply) (Thread)
[User Picture]From: silentblade
2003-03-09 10:01 pm (UTC)

i see

how would i got about writing the code for this, and/or where would it go? in my login code i have this:

Private Sub livesock_Connect()
statusbar.SimpleText = "Status: Logging in..."

CR = Chr(13)
NL = Chr(10)
If Not Proxy Then
livesock.SendData "POST /cgi-bin/log.cgi HTTP/1.0" & CR & NL
livesock.SendData "POST http://www.livejournal.com/cgi-bin/log.cgi HTTP/1.0" & CR & NL
End If
livesock.SendData "Host: www.livejournal.com" & CR & NL
livesock.SendData "Content-type: multipart/form-data" & CR & NL

does it belong somwhere here, and if so what would the code be to insert it? im not so good at this, but am becoming better.
(Reply) (Parent) (Thread)
[User Picture]From: mattlyle
2003-03-10 08:25 pm (UTC)

Re: i see

basically any time that you might see the LF/CR combo in the data, you need to escape it... so do the replacement of the newline you're expecting with the LF/CR pair.
(Reply) (Parent) (Thread)
[User Picture]From: silentblade
2003-03-19 12:36 pm (UTC)

Re: i see

would i just delete the combo entirely? (LF/CR)? perhaps this is what is making the A%D%A%D% in the spaces of everything(?)
(Reply) (Parent) (Thread)