Conversation
macOS libiconv lists some names (e.g. WINDOWS-874) under more than one charset group. Treat the first binding as authoritative so module_iconv initialization no longer fails during the check phase on Darwin.
Author
|
For reference, the macOS job in the existing CI already fails on
I've opened #82 with those workflow changes, adding Intel macOS and fixing the Homebrew paths and the ASAN preload. It depends on this PR, so the two can be reviewed and merged together. |
Drop the empty else-if branch; only declare aliases that are not already known, with the explanatory comment moved above the check.
pnavais
force-pushed
the
fix/darwin-iconv-duplicate-aliases
branch
from
September 30, 2026 20:14
b83b13d to
ba15819
Compare
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.
On macOS,
iconv -llists some charset aliases under more than one group. In particular,WINDOWS-874appears with bothCP1162andCP874. Whentables.pyturns that listing intoiconvdecl.h,module_iconvthen tries to declare the same alias for two different charsets and aborts initialization with a contradiction error. That makes the check phase fail on aarch64-darwin (and likely x86_64-darwin as well).This change:
tables.py, when digestingiconv -l, keep only the first occurrence of each alias name.module_iconv, if an alias is already bound to a different charset, keep the existing binding instead of failing.Verified on aarch64-darwin with recode 3.7.16: 488 good tests.