W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Textarea and new line

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 30 Jun 2004 12:53:32 +0000 (UTC)
Message-ID: <Pine.LNX.4.58.0406301250210.27872@dhalsim.dreamhost.com>
On Mon, 28 Jun 2004, Shift wrote:
> How a new line will be represented ?
> On Mac new line = \r => One character,
> On Unix/Linux new line = \n => One character;
> On Windows new line = \r\n => Two characters.

Good point. I've added text to the spec saying that a newline should
always be submitted as a single U+000A character (what you call \n).
(Chosen because that is the official newline character in CSS too.)

> Which style of new line will be used ? Will it be possible to include an
> attribute to specifie the way new lines are handle or are there any ways
> to done that with current HTML specifications ?

I don't think there really is a need for an attribute -- so long as the
content is normalised on the client to always use U+000A, then on the
server you can do what you want with it.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 30 June 2004 05:53:32 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC