[Melbourne-pm] Handling line ending characters

Robert Norris rob at eatenbyagrue.org
Thu Nov 1 20:31:56 PDT 2012


On Fri, Nov 02, 2012 at 01:59:09PM +1100, Stephen Edmonds wrote:
> One common solution seems to be to go to a regex with \r?\n,
> \015?\012, etc, while another option is to use  Encode::Newlines
> (which does do regexes internally, but maintaining that is not our
> concern)

Either of these is fine. I've only ever done the regex, but modules are
great.

> A further question is do we convert the line endings for the
> validation and still store the originally submitted text, or do we
> store a converted version?

Converted. Normalised, if you will. Unless its going to make a
difference if you send it back to the client for display. I would hope
not.

Rob.


More information about the Melbourne-pm mailing list