Skip to content

"Invalid UTF-8 sequence" Exception #76

@staabm

Description

@staabm

Version: 3.3.4

Bug Description

when putting a invalid utf8 character into a neon file we get a "Invalid UTF-8 sequence" when loading said file back

Steps To Reproduce

decode the following NEON

parameters:
	ignoreErrors:
		-
			message: '#^Regex pattern is invalid\: Compilation failed\: UTF\-8 error\: byte 2 top bits not 0x80 at offset 0 in pattern\: \!�\[�\-�\]\!u$#'
			count: 1
			path: src/bug-12629.php

this error message happens for patterns like

Strings::match('', "![\x80-\x9f]!u")

Expected Behavior

I think the message should have "better escaping" at encoding time, so the string can be decoded without a exception

Possible Solution

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions