dedex icon indicating copy to clipboard operation
dedex copied to clipboard

xml parse multibyte UTF8 string with invalid result

Open ignacioalles opened this issue 9 months ago • 3 comments

An invalid value is produced when multibyte char is present in XML file. Altough it seams to be handled in: https://github.com/miqwit/dedex/blob/76e150b35adb7652eddcb95c261b9b920866c095/src/Controller/ErnParserController.php#L450-L454

there is still an issue because the preceding value to which the new value is concatenated, was trimmed here: https://github.com/miqwit/dedex/blob/76e150b35adb7652eddcb95c261b9b920866c095/src/Controller/ErnParserController.php#L606

thus removing the whitespaces that might be between them.

Current code works fine if special char is not preceded by whitespace (eg: Juan García) but produced wrong value if it is (eg: Juan Ávila results in JuanÁvila)

ignacioalles avatar May 14 '24 19:05 ignacioalles