Skip to content

match_names(partial = FALSE) no longer uses a non-UTF-8 sentinel string. - #45

Open
mbojan wants to merge 1 commit into
masterfrom
i44-nonportable-strings
Open

mbojan wants to merge 1 commit into
masterfrom
i44-nonportable-strings

Conversation

@mbojan

@mbojan mbojan commented Sep 17, 2026

Copy link
Copy Markdown
Member

The literal "\n\xf5\xdc\n" is invalid UTF-8 and unmarked, so when the package was installed in a UTF-8 locale and then loaded in a C locale (e.g., on stripped-down HPC compute nodes), unserializing the function from the lazy-load DB produced "strings not representable in native encoding" and "cannot be translated to UTF-8" warnings.

Since pmatch() assigns all exact matches (sequentially) before attempting any partial ones, discarding the non-exact assignments afterwards gives exactly the result the sentinel was emulating.

Fixes #44.

The literal "\n\xf5\xdc\n" is invalid UTF-8 and unmarked, so when the
package was installed in a UTF-8 locale and then loaded in a C locale
(e.g., on stripped-down HPC compute nodes), unserializing the function
from the lazy-load DB produced "strings not representable in native
encoding" and "cannot be translated to UTF-8" warnings.

Since pmatch() assigns all exact matches (sequentially) before
attempting any partial ones, discarding the non-exact assignments
afterwards gives exactly the result the sentinel was emulating.

Fixes #44.
@mbojan mbojan linked an issue Sep 17, 2026 that may be closed by this pull request
@mbojan
mbojan marked this pull request as ready for review September 17, 2026 13:16
@mbojan
mbojan requested a review from krivit September 17, 2026 13:19
@mbojan

mbojan commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

Rather dry housekeeping safe to be merged, but I might miss where it is used in the Statnet entire...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serialization warnings

1 participant