develooper Front page | perl.perl5.porters | Postings from May 2013

Re: Proposal: initial type annotation in SV

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
May 6, 2013 05:54
Subject:
Re: Proposal: initial type annotation in SV
Message ID:
20130506075413.3d4fbd51@pc09.procura.nl
On Sun, 5 May 2013 23:45:25 +0200, Sébastien Aperghis-Tramoni
<maddingue@free.fr> wrote:

> Because of this, some serializers resort to sniffing the value with
> regexps (for example, XML::RPC, XMLRPC::Lite), which resolves part
> of the problem, but introduces some side effects.

Of course the problem also exists the other way round

 foo,mars,01042013,"This is wrong"

CSV data is likely to be "interpreted" as as Jan 4, 2013 in Excel,
even when put inside quotes

 foo,mars,"01042013","This is wrong"

Dates, with or without quotation, will always be a problem with Excel,
as locales influence interpretation on both sides, generation and
interpretation.

IMHO deserializers should NEVER interpret. They should do what is told
them to do and not more. This implies that passing an option to parse
(ISO) dates as YYYYMMDD, DDMMYYYY, MMYYYDD, or whatever should be fine

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.17   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About