BASH
Configurare email
Configurare software
Hardware
Linux
Linux Mint
Pentru tonti
Securitate
VMWARE
Windows
linux :: postgresql sql_ascii in utf8
CAMSCAPE SERVICES Cristian M. |
Title | PostgreSQL SQL_ASCII in UTF8 |
Tags | PostgreSQL, SQL_ASCII, UTF8 | |
Desc. | Conversie SQL_ASCII in UTF8 pentru baze de date PostgreSQL | |
Code | KBLN0021 v1.0 | |
Date | 22 decembrie 2013 |
Salvati baza de date:
pg_dump nume_db > fisier.sql
Instalati recode (http://www.gnu.org/software/recode/) si convertiti dump-ul:
cat fisier.sql | recode iso-8859-1..u8 > fisier-utf8.sql
Inlocuiti CLIENT ENCODING:
cat fisier-utf8.sql | sed `s/SQL_ASCII/UTF8/g` > fisier-utf8-dump.sql
Importati dump-ul:
psql baza_de_date < fisier-utf8-dump.sql