Closed (fixed)
Project:
Azure OpenAI Augmentor
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Jul 2024 at 13:46 UTC
Updated:
31 Jul 2024 at 16:04 UTC
Jump to comment: Most recent
We utilize a htmlspecialchars_decode(iconv()) which helps encode our text, however there are certain edge cases where:
$dom->loadHTML(htmlspecialchars_decode(iconv('UTF-8', 'ISO-8859-1', htmlentities($text, ENT_COMPAT, 'UTF-8')), ENT_QUOTES));
could result in data loss if there are encoding mismatches when using functions like iconv.
It looks like for PHP 8.2 the accepted solution for this is leveraging:
$dom->loadHTML(mb_encode_numericentity($text, [0x80, 0x10FFFF, 0, ~0], 'UTF-8'));
Let's switch it to use that instead.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
j-barnes commentedComment #5
j-barnes commentedComment #6
j-barnes commented