You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In statnet/ergm#641 we added neat progress bars. On a HPC which has, it seems, very stripped images on computing nodes, I'm getting locale-related warnings. Benign but annoying.
I thought its the progress bars, but apparently not.
Warning: strings not representable in native encoding will be translated to UTF-8
Warning: input string '
<f5><dc>
' cannot be translated to UTF-8, is it valid in 'UTF-8'?
Warning: input string '
<f5><dc>
' cannot be translated to UTF-8, is it valid in 'UTF-8'?
Warning: input string '
<f5><dc>
' cannot be translated to UTF-8, is it valid in 'UTF-8'?
Warning: input string '
<f5><dc>
' cannot be translated to UTF-8, is it valid in 'UTF-8'?
Burning in ======================>-------- 74% | ETA: 1s
Best valid proposal 'BDStratTNT' cannot take into account hint(s) 'triadic'.
Burning in ===============>--------------- 49% | ETA: 1s
Root cause (verified locally): both warnings come from R's ReadChar() in src/main/serialize.c, i.e. from unserializing a native-encoded, non-ASCII string that was serialized under a different native encoding. The string is the "crude sentinel" literal in statnet.common::match_names():
"\n\xf5\xdc\n" is invalid UTF-8 and unmarked (CE_NATIVE). When statnet.common is installed in a UTF-8 locale, the lazy-load DB records native encoding UTF-8; when the function is first lazy-loaded in a C-locale session, R tries to translate the string, fails, and warns — once for "strings not representable…" and once per copy of the literal (source + bytecode constant pool → 3). ergm triggers it on its first match_names() call (R/ergm.R:408/471, R/san.R, R/simulate.R, …), which lands right next to the burn-in bar.
Activity
[-]Progress bars emitting non-portable strings?[/-][+]Serialization warnings[/+]mbojan commentedon Sep 17, 2026
Claude writes:
Root cause (verified locally): both warnings come from R's
ReadChar()insrc/main/serialize.c, i.e. from unserializing a native-encoded, non-ASCII string that was serialized under a different native encoding. The string is the "crude sentinel" literal instatnet.common::match_names():"\n\xf5\xdc\n"is invalid UTF-8 and unmarked (CE_NATIVE). When statnet.common is installed in a UTF-8 locale, the lazy-load DB records native encoding UTF-8; when the function is first lazy-loaded in a C-locale session, R tries to translate the string, fails, and warns — once for "strings not representable…" and once per copy of the literal (source + bytecode constant pool → 3). ergm triggers it on its firstmatch_names()call (R/ergm.R:408/471,R/san.R,R/simulate.R, …), which lands right next to the burn-in bar.Reproduction (no ergm needed):
LC_ALL=C Rscript -e 'options(warn=1); invisible(statnet.common::match_names)'