Skip to content

Error diffing tables containing UTF-8 characters #134

Closed
@cim--

Description

@cim--

Version 0.1.16 fails with an iconv() error when trying to convert a table containing a UTF-8 character with no named html entity equivalent (so e.g. £ is fine but ■ will fail)
Version 0.1.15 works correctly.

Seems to be failing at line 630 of lib/Caxy/HtmlDiff/Table/TableDiff.php on the attempt to convert to iso-8859-1 encoding, possibly as a consequence of the changes for #123

Minimal reproduction

$t = "<table><tr><td>■</td></tr></table>"; 
$t2 = "<table><tr><td>■■</td></tr></table>";
$d = new Caxy\HtmlDiff\HtmlDiff($t, $t2); 
$d->build();

gives
iconv(): Detected an illegal character in input string in vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php on line 630

Thanks

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