BIND_TEXTDOMAIN_CODESET



BIND_TEXTDOMAIN_CODESET

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

bind_textdomain_codeset − set encoding of message translations

SYNOPSIS

#include <libintl.h>

char * bind_textdomain_codeset (const char * domainname,
const char *
codeset);

DESCRIPTION

The bind_textdomain_codeset function sets the output codeset for message catalogs for domain domainname.

A message domain is a set of translatable msgid messages. Usually, every software package has its own message domain.

By default, the gettext family of functions returns translated messages in the locale’s character encoding, which can be retrieved as nl_langinfo(CODESET). The need for calling bind_textdomain_codeset arises for programs which store strings in a locale independent way (e.g. UTF-8) and want to avoid an extra character set conversion on the returned translated messages.

domainname must be a non-empty string.

If codeset is not NULL, it must be a valid encoding name which can be used for the iconv_open function. The bind_textdomain_codeset function sets the output codeset for message catalogs belonging to domain domainname to codeset. The function makes copies of the argument strings as needed.

If codeset is NULL, the function returns the previously set codeset for domain domainname. The default is NULL, denoting the locale’s character encoding.

RETURN VALUE

If successful, the bind_textdomain_codeset function returns the current codeset for domain domainname, after possibly changing it. The resulting string is valid until the next bind_textdomain_codeset call for the same domainname and must not be modified or freed. If a memory allocation failure occurs, it sets errno to ENOMEM and returns NULL. If no codeset has been set for domain domainname, it returns NULL.

ERRORS

The following error can occur, among others:

ENOMEM

Not enough memory available.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

SEE ALSO

gettext(3), dgettext(3), dcgettext(3), ngettext(3), dngettext(3), dcngettext(3), textdomain(3), nl_langinfo(3), iconv_open(3)




More Linux Commands

manpages/klogconsole.html
klogconsole(8) Tells the kernel to what terminal it should c
The program klogconsole tells the kernel to what terminal and starting from what level it should copy printk(9) messages. General Options -l &lt;console_loglevel&gt;

manpages/glPopAttrib.3gl.html
glPopAttrib(3gl) - push and pop the server attribute stack
glPushAttrib takes one argument, a mask that indicates which groups of state variables to save on the attribute stack. Symbolic constants are used to set bits i

manpages/ldapadd.1.html
ldapadd(1) - LDAP modify entry and LDAP add entry tools.....
ldapmodify is a shell-accessible interface to the ldap_add_ext(3), ldap_modify_ext(3), ldap_delete_ext(3) and ldap_rename(3). library calls. ldapadd is implemen

manpages/intro4.html
intro(4) - Introduction to special files - Linux man page...
Section 4 of the manual describes special files (devices). FILES /dev/* device files NOTES Authors and copyright conditions Look at the header of the manual pag

manpages/gnutls_pkcs11_init.3.html
gnutls_pkcs11_init(3) - API function - Linux manual page....
This function will initialize the PKCS 11 subsystem in gnutls. It will read configuration files if GNUTLS_PKCS11_FLAG_AUTO is used or allow you to independently

manpages/Mail::SpamAssassin::Plugin::DKIM.3pm.html
Mail::SpamAssassin::Plugin::DKIM(3pm) - perform DKIM verific
This SpamAssassin plugin implements DKIM lookups as described by the RFC 4871, as well as historical DomainKeys lookups, as described by RFC 4870, thanks to the

manpages/NetSNMP::agent::default_store.3pm.html
NetSNMP::agent::default_store(3pm) - Perl extension for Net-
The NetSNMP::agent::default_store module defines the agent-specific Net-SNMP default storage variables. EXPORT None by default. Exportable constants NETSNMP_DS_

manpages/numcodes.3ncurses.html
numcodes(3ncurses) - curses terminfo global variables.......
This page summarizes variables provided by the curses librarys low-level terminfo interface. A more complete description is given in the curs_terminfo(3X) manua

manpages/gnutls_x509_crt_get_extension_by_oid.3.html
gnutls_x509_crt_get_extension_by_oid(3) - API function......
gnutls_x509_crt_get_extension_by_oid.3 - This function will return the extension specified by the OID in the certificate. The extensions will be returned as bin

manpages/startpar.html
startpar
startpar

manpages/XtAppPeekEvent.3.html
XtAppPeekEvent(3) - query and process events and input......
If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at th

manpages/mono-config.5.html
mono-config(5) - Mono runtime file format configuration.....
The Mono runtime will load configuration data from the installation prefix /etc/mono/config file, the ~/.mono/config or from the file pointed by the MONO_CONFIG





We can't live, work or learn in freedom unless the software we use is free.