Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reword discussion of /d regexp modifier. #19087

Merged
merged 1 commit into from Aug 30, 2021

Conversation

FGasper
Copy link
Contributor

@FGasper FGasper commented Aug 27, 2021

The phrasing as it stood confused UTF8-flagged strings with
“UTF-8 encoded”. The latter term should refer to strings that the
Perl application has actually encode()d, which probably won’t
be UTF8-flagged and thus won’t, per /d modifier rules, get the Unicode
treatment.

This also reorders and rewords some parts in an attempt to clarify that
new code should avoid this flag, including use of the 'unicode_strings'
feature to avoid implicit use.

@FGasper FGasper force-pushed the fix_utf8_verbiage_in_perlre branch 3 times, most recently from 5fbaad5 to c42e874 Compare August 27, 2021 20:16
The phrasing as it stood confused UTF8-flagged strings with
“UTF-8 encoded”. The latter term should refer to strings that the
Perl application has actually encode()d, which probably *won’t*
be UTF8-flagged and thus won’t, per /d modifier rules, get the Unicode
treatment.

This also removes an incorrect statement about only ASCII characters
matching in the absence of (the UTF8 flag). This is trivially false
given that "\xff" =~ /\xff/ is truthy.

This also reorders and rewords some parts in an attempt to clarify that
new code should avoid this flag, including use of the 'unicode_strings'
feature to avoid implicit use.
@Grinnz
Copy link
Contributor

Grinnz commented Aug 27, 2021

This also removes an incorrect statement about only ASCII characters matching in the absence of (the UTF8 flag).

I believe this was clumsily attempting to reference that character classes like \w and \d only match ASCII characters in this instance. That said, the /a section sufficiently explains this.

@xenu xenu merged commit a9a1cd1 into Perl:blead Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants