Discards string elements that can't be converted

Created on 30 July 2024, 4 months ago
Updated 19 September 2024, 2 months ago

Problem/Motivation

The iconv will return nothing in case of the value contains characters that can't be converted.
$dom->loadHTML(htmlspecialchars_decode(iconv('UTF-8', 'ISO-8859-1', htmlentities($text, ENT_COMPAT, 'UTF-8')), ENT_QUOTES));

Steps to reproduce

1. Try to index text that contains emoji
2. An error is thrown and the value is not indexed.

Proposed resolution

Pass ignore flag to discard these characters that are not convertable.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇷🇴Romania szloredan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024