postgresql_16:4.9.3 Character Set Support
PostgreSQL 16 > Server Administration > Localization > Character Set Support
The character set support in PostgreSQL allows you to store text in a variety of character sets (also called encodings), including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as EUC (Extended Unix Code), UTF-8, and Mule internal code. All supported character sets can be used transparently by clients, but a few are not supported for use within the server (that is, as a server-side encoding). The default character set is selected while initializing your PostgreSQL database cluster using initdb. It can be overridden when you create a database, so you can have multiple databases each with a different character set.
An important restriction, however, is that each database's character set must be compatible with the database's LC_CTYPE (character classification) and LC_COLLATE (string sort order) locale settings. For C or POSIX locale, any character set is allowed, but for other libc-provided locales there is only one character set that will work correctly. (On Windows, however, UTF-8 encoding can be used with any locale.) If you have ICU support configured, ICU-provided locales can be used with most but not all server-side encodings.
Subsections
- postgresql_16:4.9.3.1 Supported Character Sets
- postgresql_16:4.9.3.2 Setting the Character Set
- postgresql_16:4.9.3.3 Automatic Character Set Conversion Between Server and Client
- postgresql_16:4.9.3.4 Available Character Set Conversions
- postgresql_16:4.9.3.5 Further Reading