---
name: "xo_no_setlocale"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/xo_no_setlocale"
---

# xo\_no\_setlocale(3)

prevent implicit call to setlocale

## NAME

**xo\_no\_setlocale** – prevent implicit call to setlocale

## LIBRARY

library “libxo”

## SYNOPSIS

**#include \<libxo/xo.h\>**

*void*\

**xo\_no\_setlocale**(*void*);

## DESCRIPTION

**libxo** automatically initializes the locale based on the setting of the environment variables LC\_CTYPE, LANG, and LC\_ALL. The first of this list of variables is used and if none of the variables are set, the locale defaults to *UTF-8*. The caller may wish to avoid this behavior, and can do so by calling the **xo\_no\_setlocale**() function.

## SEE ALSO

[xo\_emit(3)](/xo_emit/3.md), [xo\_open\_container(3)](/xo_open_container/3.md), [xo\_open\_list(3)](/xo_open_list/3.md), [xo\_format(5)](/xo_format/5.md), [libxo(3)](/libxo/3.md)

## HISTORY

The **libxo** library first appeared in FreeBSD 11.0.

## AUTHORS

**libxo** was written by Phil Shafer ⟨*phil@freebsd.org*⟩.
