ECONF\_SETQUOTES(3) libeconf Manual ECONF\_SETQUOTES(3)

# [NAME](#NAME)

econf\_setQuotes - set whether the value of a key has to be enclosed by quotes

# [SYNOPSIS](#SYNOPSIS)

```
#include <libeconf.h>
```

**econf\_err econf\_setQuotes(econf\_file \*kf, const char \*group, const char \*key, const bool quotes);**

# [DESCRIPTION](#DESCRIPTION)

The **econf\_setQuotes**() function sets whether the value of the key specified by *group* and *key* in the given configuration file object *kf* has to be enclosed by quotes when the configuration is written back with **econf\_writeFile**(). If *group* is **NULL**, the key is considered to belong to no group.

If *quotes* is **true**, the value will be written enclosed by double quotes. If *quotes* is **false**, the value will be written without quotes.

Unlike the **econf\_set\*Value**() functions, **econf\_setQuotes**() does not create the key if the *group*/*key* combination does not already exist.

The default value of the quotes flag for newly created entries (entries not read from a configuration file) can be changed from **false** to **true** with the **DEFAULT\_QUOTES** option of **econf\_newKeyFile\_with\_options**().

# [RETURN VALUE](#RETURN_VALUE)

Upon successful completion, this function returns **ECONF\_SUCCESS**.

On error, a non-zero error code is returned (see the section called “ERRORS”).

# [ERRORS](#ERRORS)

**ECONF\_FILE\_LIST\_IS\_NULL**

Conf file list is NULL.

**ECONF\_EMPTYKEY**

Key is NULL or has empty value.

**ECONF\_NOKEY**

Key not found.

# [SEE ALSO](#SEE_ALSO)

[**libeconf**(3)](/man/os/libeconf/libeconf.3), [**econf\_hasQuotes**(3)](/man/os/libeconf/econf_hasQuotes.3), [**econf\_setValue**(3)](/man/os/libeconf/econf_setValue.3), [**econf\_writeFile**(3)](/man/os/libeconf/econf_writeFile.3), [**econf\_errString**(3)](/man/os/libeconf/econf_errString.3)

2026-10-15 libeconf

---

Document: econf_setQuotes(3) from libeconf 0.8.6-r0 (Chainguard OS)
Source: https://github.com/openSUSE/libeconf
