Last active
January 27, 2021 05:57
-
-
Save MarceloHoffmeister/464d6d02f18d50298007be1283587e6f to your computer and use it in GitHub Desktop.
Configure Linux OS with LATIN1 encode on Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add support to desire language/locale | |
sudo echo "pt_BR.ISO-8859-1 ISO-8859-1" >> /var/lib/locales/supported.d/local | |
// recompile locales to add support for OS | |
sudo dpkg-reconfigure locales | |
// before create DB, restart Postgres service | |
sudo service postgresql restart | |
// login in your postgres client | |
sudo su - postgres | |
psql | |
// create example db with some specific parameters | |
CREATE DATABASE db_with_LATIN1 ENCODING 'LATIN1' LC_COLLATE 'pt_BR.ISO-8859-1' LC_CTYPE 'pt_BR.ISO-8859-1' template template0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment