From: Tom Lane <tgl@sss.pgh.pa.us>
To: dmigowski@ikoffice.de
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11523: Regular expressions work differently on different platforms
Date: Tue, 30 Sep 2014 09:58:44 -0400
Message-ID: <7485.1412085524@sss.pgh.pa.us> (raw)
In-Reply-To: <20140930095625.7631.32436@wrigleys.postgresql.org>
References: <20140930095625.7631.32436@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
dmigowski@ikoffice.de writes:
> I recently found that regular expressions, or specifically the [:space:]
> shorthand escape work differntly on Windows and Linux. On Linux the
> non-brakeable space is not included in the shorthand escape, on windows it
> is.
That would depend on what locale you're using for LC_CTYPE. We can't do
much about the fact that locale definitions vary across platforms. In
principle you could use C locale, which *is* standardized, but that cure
may be worse than the disease for your purposes.
You could always spell it out with whatever set of characters you consider
whitespace: [ \t\r\n] or something like that. For purposes like email
address validation, the set of whitespace characters allowed by the
relevant RFCs is probably smaller than most locales' [:space:] anyway.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dmigowski@ikoffice.de
Subject: Re: BUG #11523: Regular expressions work differently on different platforms
In-Reply-To: <7485.1412085524@sss.pgh.pa.us>
References: <20140930095625.7631.32436@wrigleys.postgresql.org> <7485.1412085524@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox