dwcaress/MB-System: 5.8.3beta18
作者:David W. Caress, klheadley, Kurt Schwehr, Tom O’Reilly, Nicolas Porras Falconio, Mike McCann, Varad, Joaquim, Carlos Rueda, Lyn-Solarn, Christian Ferreira, braanan, Zac Berkowitz, kdowling99, Aret Tinoco, David Martinez, anbj, Julian, Jorge Barrera, IvanMart57, Steven Patrick, Jenny Paduan, Federico Esteban, jocy, Daniel Karnofel, André Gutierrez, Dan Rose, Jesse Benavides, Massimo Di Stefano, Massimo Di Stefano · 发表于:Zenodo (CERN European Organization for Nuclear Research) · 年份:2026 · DOI:10.5281/zenodo.22682951 · 研究领域:Computer science、Programming language、Operating system
Programs mbedit, mbnavedit, mbnavadjust, mbvelocitytool, mbgrdviz, mbeditviz: Fixed these Motif GUI programs printing spurious locale-related warnings to stderr on macOS, of the form "Warning: Locale not supported for XmbTextListToTextProperty" and "Warning: Cannot convert XmString to compound text", repeated once for every dialog or window created during a session. The root cause is that macOS's system Xlib ships locale data only for the "C" locale; when a program's environment requests a UTF-8 locale (the default in a normal macOS Terminal session), Xt's language procedure leaves libc and Xlib in a mismatched locale state, and Motif's XmString-to-compound-text conversion routines fail on every dialog as a result. Fixed by forcing the process environment (LC_ALL and LANG) to "C" before XtSetLanguageProc()/XtVaOpenApplication() read it, so Xt's own locale fallback completes in a consistent state instead. Three of the six programs (mbnavadjust, mbvelocitytool, mbgrdviz) already had a call to XtSetLanguageProc() present but commented out; the other three (mbedit, mbnavedit, mbeditviz) had no locale handling at all. This still left two harmless, one-time warnings at startup ("locale not supported by Xlib, locale set to C" and "X locale modifiers not supported, using default"), printed by Xt's own default language procedure via XtWarning(); these were eliminated as well by installing a temporary, silent XtWarningHandler for the duration of the XtVaOpenApplication() call in each p...