Skip to content

Feature request: Strict mode for decode_entities() #40

@bschmalhofer

Description

@bschmalhofer

Since 2004 decode_entities() supports the merging of surrogate pairs. See http://rt.cpan.org/Ticket/Display.html?id=7785 . This means that for example �� will be decoded into a single code point. My understanding that this not covered in any spec.

I therefore propose to add a function decode_entities_strict() that does the same as decode_entities() but rejects surrogate pairs.

Attached is a sample script that shows the effect-
surrogate_pair.pl.txt

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