From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | dmigowski(at)ikoffice(dot)de |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #11523: Regular expressions work differently on different platforms |
Date: | 2014-09-30 13:58:44 |
Message-ID: | 7485.1412085524@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
dmigowski(at)ikoffice(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | bryan | 2014-09-30 16:05:52 | BUG #11526: WITH tables not accessible from function |
Previous Message | Feike Steenbergen | 2014-09-30 12:05:16 | Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql |