[Melbourne-pm] Handling line ending characters

Kahlil Hodgson kahlil.hodgson at dealmax.com.au
Fri Nov 2 23:26:17 PDT 2012

On 02/11/12 14:31, Robert Norris wrote:
>> 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.

I generally normalise the data before validating (trimming white space 
at the edges) and store and return the normalised version.  Do this for 
both server and client side for consistency.  Have not encountered, nor 
can think of, any scenarios where this breaks anything.

Kahlil (Kal) Hodgson                       GPG: C9A02289
Head of Technology                         (m) +61 (0) 4 2573 0382
DealMax Pty Ltd                            (w) +61 (0) 3 9008 5281

Suite 1415
401 Docklands Drive
Docklands VIC 3008 Australia

"All parts should go together without forcing.  You must remember that
the parts you are reassembling were disassembled by you.  Therefore,
if you can't get them together again, there must be a reason.  By all
means, do not use a hammer."  -- IBM maintenance manual, 1925

More information about the Melbourne-pm mailing list