# PostgreSQL Data Types: Text Encoding

DevFeed: [PostgreSQL Data Types: Text Encoding](<https://devfeed.tech/articles/postgresql-data-types-text-encoding-34593.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2018/04/postgresql-data-types-text-encoding/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2018-04-09T11:33:01Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [ASCII](<https://devfeed.tech/topics/ascii.md>)

Tags: [ascii](<https://devfeed.tech/tags/ascii.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>)

## AI overview

This tutorial introduces PostgreSQL's text data type and explains character encoding, including ASCII representation, server-side encoding, and client-side encoding.

## Source excerpt

Continuing our series of PostgreSQL Data Types today we're going to introduce the PostgreSQL text data type. The first notion to understand when processing text in any program is of course the notion of encoding. So when addressing the text datatype we must mention encoding settings, and possibly also issues. An encoding is a particular representation of characters in bits and bytes. In the ASCII encoding the letter A is encoded as the 7-bits byte 1000001, or 65 in decimal, or 41 in hexadecimal. All those numbers are going to be written the same way on-disk, and the letter A too.