While testing 17270 I noticed that master (bdda137878904e9401a84e308ac74c93c2ef87c1) does not run on NetBSD. I assume this started after #17085 changed the fallback locale from `C` to `C.UTF-8`. There doesn't seem to be a `C.UTF-8` locale on NetBSD.

```bash
src/bitcoind
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Abort trap (core dumped)
```

`LC_ALL=C src/bitcoind` works, `LC_ALL=en_US.UTF-8 src/bitcoind` does not.

```bash
locale
LANG=""
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=""
```
{
    fs::path path, path_tmp;
    if (!GetSettingsPath(&path,  false) || !GetSettingsPath(&path_tmp,  true)) {
        throw std::logic_error("Attempt to write settings file when dynamic settings are disabled.");
    }
    LOCK(cs_args);
    std::vector<std::string> write_errors;
    if (!util::WriteSettings(path_tmp, m_settings.rw_settings, write_errors)) {
        SaveErrors(write_errors, errors);
        return false;
    }
    if (!RenameOver(path_tmp, path)) {
        SaveErrors({strprintf("Failed renaming settings file %s to %s\n", path_tmp.string(), path.string())}, errors);
        return false;
    }
    return true;
}
bool ArgsManager::IsArgNegated(const std::string& strArg) const
{
    return GetSetting(strArg).isFalse();
}
std::string ArgsManager::GetArg(const std::string& strArg, const std::string& strDefault) const
{
    const util::SettingsValue value = GetSetting(strArg);
    return value.isNull() ? strDefault : value.isFalse() ? "0" : value.isTrue() ? "1" : value.get_str();
}
int64_t ArgsManager::GetArg(const std::string& strArg, int64_t nDefault) const