<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1909&amp;type=atom"/>
	<updated>2013-11-27T21:09:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1909</id>
		<entry>
			<title type="html"><![CDATA[Odp: ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4842#p4842"/>
			<content type="html"><![CDATA[chyba się zasugerowałem tym kodowaniem win1250, samo kodowanie w obu bazach będzie UTF8 (parametr ENCODING), a tyko ustawienia klienta będą pod WIN1250;
Zrób tak:
1. pg_dump --encoding=UTF8 --username=postgres --create -W test >c:\backup.sql
2. 2. w pliku backupu zmieniłem polecenie  CREATE DATABASE na:
CREATE DATABASE test_1250 WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Polish_Poland.1250' LC_CTYPE = 'Polish_Poland.1250';
ALTER DATABASE test_1250 OWNER TO postgres;
\connect test_1250
3.psql --file=e:\dane\Bea\b.sql postgres postgres

I mam nadzieję, że wszystko będzie OK]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2013-11-27T21:09:57Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4842#p4842</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4828#p4828"/>
			<content type="html"><![CDATA[:(

pg_dump: [archiver (db)] query failed: ERROR:  character with byte sequence 0xc2
 0x9d in encoding "UTF8" has no equivalent in encoding "WIN1250"
pg_dump: [archiver (db)] query was: FETCH 100 FROM _pg_dump_cursor]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-11-25T09:31:41Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4828#p4828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4827#p4827"/>
			<content type="html"><![CDATA[nie mam pomysłu ale zobacz tak (pomijam generowania polecenia COPY za to będą INSERTY, i pg_dump będzie pokazywał szczegóły) - używaj pg_dump-a, który jest w katalogu bin tam gdzie masz zainstalowanego postgresa:

pg_dump -v --inserts --encoding=WIN1250 --username=postgres --create -W test >e:\dane\b.sql]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2013-11-25T08:43:28Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4827#p4827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4821#p4821"/>
			<content type="html"><![CDATA[Niestety...



c:\PostgreSQL\9.2\bin>pg_dump --encoding=WIN1250 --username=postgres --cr
eate -W test >c:\backup.sql
Password:
pg_dump: Dumping the contents of table "users" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR:  character with byte sequence 0xc2 0x
88 in encoding "UTF8" has no equivalent in encoding "WIN1250"
pg_dump: The command was: COPY ....

:(]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-11-25T05:37:55Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4821#p4821</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4812#p4812"/>
			<content type="html"><![CDATA[Też mam wersję 9.2 i u mnie działa 
Wykonałem 
1. backup poleceniem pg_dump --encoding=WIN1250 --username=postgres --create -W test_c >e:\dane\bea\b.sql
2. w pliku backupu zmieniłem polecenie  CREATE DATABASE na: 
CREATE DATABASE test_1250 WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Polish_Poland.1250' LC_CTYPE = 'Polish_Poland.1250';
ALTER DATABASE test_1250 OWNER TO postgres;
\connect test_1250
3. Wykonałem backup za pomocą polecenia: psql --file=e:\dane\Bea\b.sql postgres postgres
I wszystko się wykonało]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2013-11-22T22:07:08Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4812#p4812</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4811#p4811"/>
			<content type="html"><![CDATA[Witam. mam baza postgres 9.2 pod windows ustawuenia:
ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'C'
       LC_CTYPE = 'C'
       CONNECTION LIMIT = -1;

Poszykuje sposobu by ją odtworzyć pod bazą z kodowaniem win1250. 

Próbowałem wykonać eksport z kodowaniem win1250 ale zwraca mi:

pg_dump: Dumping the contents of table "buhaje" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR:  character with byte sequence 0xc2 0x88 in encoding "UTF8" has no equivalent in encoding "WIN1250"

:(

Przy odtwarzaniu jako win1250 mam:

ERROR:  character with byte sequence 0xc2 0x9d in encoding "UTF8" has no equivalent in encoding "WIN1250"


Jest jakiś na to sposób?]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-11-22T11:01:15Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4811#p4811</id>
		</entry>
</feed>
