Fix iconv error on CSV export with special characters (RES-2058)#828
Merged
Fix iconv error on CSV export with special characters (RES-2058)#828
Conversation
Add //IGNORE flag to all iconv calls using //TRANSLIT in ExportController. This prevents "Detected an illegal character in input string" errors on servers with older glibc (2.27) and POSIX locale, which lack transliteration tables for certain Unicode characters like emdash (—). The error was triggered when exporting events for a network containing a group with special characters in the name. The fix ensures untransliterable characters are skipped rather than causing an error. Note: The test documents this issue but cannot reproduce the actual error because the Docker test environment uses glibc 2.41 which has better transliteration support than the production server's glibc 2.27. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34f74c3 to
20b4913
Compare
…r/fr-BE tag translations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6df8b6e to
759e106
Compare
|
Local working tree had CRLF files that don't match the .gitattributes eol=lf rule. Commit the normalization before merging develop.
Brings in Laravel 10 + group tags. Conflict resolutions: - lang/fr/networks.php and lang/fr-BE/networks.php: HEAD side added a duplicate description_placeholder key (already defined earlier in the same array); took develop's version which doesn't duplicate.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
//IGNOREflag to alliconvcalls using//TRANSLITin ExportControllerProblem
The network event export was failing on production with:
We think this occurred when exporting events for a network containing a group with an emdash (—) in the name. But we can't reproduce the actual problem.
Solution
Nevertheless there is a likely fix to change all
iconv('UTF-8', 'ASCII//TRANSLIT', ...)calls toiconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', ...). The//IGNOREflag tells iconv to skip characters that cannot be transliterated rather than throwing an error.