Forum Moderators: open

Message Too Old, No Replies

Character used for a Return

         

chocobogo

3:19 pm on May 20, 2002 (gmt 0)

10+ Year Member



I have seen it before.
It isnt HTML code because that would be <br>

it is something like
"¦" this will cause the next word to start on the next line.

e.g.If i wanted to write the following sentence

I
am
trying
hard

It would be writted as
I¦am¦trying¦hard

and this would show with line spaced

I hope I am making sense?
does anyone know it??

Nick_W

3:35 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In an html document you need <br /> but I think you mean in text right?

You can use \n as a new line charicter.

Nick

chocobogo

3:48 pm on May 20, 2002 (gmt 0)

10+ Year Member



He is what I am trying to do:

I want to have an pre-written body in my email link, so far i have

mailto:me@me.com?body=first line

What i want to know is how to put a line break in.

Nick_W

4:01 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to have an pre-written body in my email link, so far i have

mailto:me@me.com?body=first line

Just try what i said

body=this is a line\nand so is this.

You may have to find out the correct char for spaces and there are way more elegant solutions than passing the message in the url but try it....

Nick

DaveN

4:07 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



use %0A

DaveN

<a href="mailto:ME@ME.COM?body=first line%0ASECOND LINE">dave</a>

bruhaha

6:35 pm on May 20, 2002 (gmt 0)

10+ Year Member



"%0A" is the hexadecimal code for a new line. But note that you will need additional code if your body includes any spaces, punctuation, or special symbols. For instance, for a space you must use "%20" (thus "first%20line"). If you fail to do so, your text will end at that point.

It should be pretty easy to find a list of all the symbols --just search for "URL encoding". There are even some sites with tools that will automatically encode your URL's for you, saving you the trouble.

Also, be aware that some email clients (Lotus Notes, for one)cannot handle the body tag, though cc, bcc and subject may work fine.

Finally, you'll generally be told that you should include both the carriage return (%0D) and new line feed (%0A). That's technically the right way to do it, though in my experience just one (either) seems to work in this situation.

sun818

8:09 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A newline is composed differently based on the OS. If your client is Windows-based, CRLF (or 0D0A in hex) is correct.

Mac - CR (0D)
PC - CRLF (0D0A)
Unix - LF (0A)

Filipe

9:41 pm on May 20, 2002 (gmt 0)

10+ Year Member



Hi,

If you're using something like ASP or something like that, I think the function

CHR(13)

Writes a newline. It's always worked for me. ASCII 13 is a newline or a linefeed or something of the sort, and it's never let me down.

evinrude

11:00 pm on May 20, 2002 (gmt 0)

10+ Year Member



ASP can also use vbCrLf, which is a Carriage Return & Line Feed. Makes it easy for those (like me) who can never remember the ASCII equiv. ;)

chocobogo

6:20 pm on May 21, 2002 (gmt 0)

10+ Year Member



thanks a lot for your help guys, you have answered my question and I have learnt something in the process.

Cheers