Author: ph10 Date: To: Ze'ev Atlas CC: pcre-dev@exim.org Subject: Re: [pcre-dev] PCRE on EBCDIC tests
On Thu, 28 May 2015, Ze'ev Atlas wrote:
> \n is definitly not defined correctly
> I ran 4 tests. Note that new line is defined correctly as 21 = 0x15 in EBCDIC
Somehow the newlines are getting lost when you quote the output of
pcretest. I am guessing where they are and putting them back (and
snipping irrelevant lines).
> /¬(?<=foo\x15)bar/Im
> foo\x15barbar
> 0: bar
That's the only match, and it's not surprising as it is totally
different regex, not involving \n at all.
> In my config.h I have#ifndef NEWLINE#define NEWLINE 21#endif
OK, that's the default 0x15. The test you did *not* do is this:
/(?<=foo\n)¬bar/Im
foo\x15barbar
Does that match? My guess is still that '\n' in C code is turning into a
character other than 0x15, causing pcretest to pass the wrong value.
What is the output from this program:
#include <stdio.h>
int main(void)
{
printf("0x%x\n", '\n');
return 0;
}