Re: [pcre-dev] UTF8 inline option feature suggestion

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] UTF8 inline option feature suggestion
Philip Hazel wrote:
> On Sun, 5 Apr 2009, Sheri wrote:
>
>
>> Philip,
>>
>> Would you consider adding another inline beginning of pattern option,
>> this one for turning on UTF8?
>>
>> Perhaps (*UTF8) ?
>>
>
> Two problems here. First is one of style. The (*xxx) things are all to
> do with backtracking, not options. Perl describes them as "verbs". The
> options are all (?x) things.

Not all. We have the line end and bsr options. Utf8 would fit nicely
IMO, and all relate only at top level.

> Second problem is that the (?x) things can
> have limited scope (e.g. inside parens). Without far more work than I am
> prepared to contemplate, I don't belive that compiling a pattern partly
> with UTF8 on and partly with it off would be feasible (or sensible).
>
>

Agreed (not sensible).
> I suppose one could insist that it be present only at top-level and give
> an error if it appeared at a lower level. I will take a look at (?8)
> perhaps. But maybe not for the forthcoming release (depending on how
> difficult it actually is).
>

Thanks,
Sheri