Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C30552E036F for ; Sat, 9 Feb 2008 10:39:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 56617-03 for ; Sat, 9 Feb 2008 10:39:09 -0400 (AST) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by postgresql.org (Postfix) with ESMTP id C59772E00C5 for ; Sat, 9 Feb 2008 10:39:17 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id r21so3362732wxc.28 for ; Sat, 09 Feb 2008 06:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=tlxa1m+3T/E+acZnCWHu09oJiYpgsCpCx3I7ZoI1uro=; b=nIgf9jG64pSQQvoQfvkjlW4D3YMIkwiRghXBPwv2cphn2K+sxzdI8qfAJHQt8zO00i1mXe7TMWIn5WYOT/tghXKjGHDr24Kcgz/EvFuJvYdHL0yX09oqYgrOH9Mk4LASRVkKaN/HHq9U8MYP0uJZRQImdekj1oP1nRf1OVXoSYk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dou4MbslC7qrH76doUdPK3dY8dNcG3Y++l9Yrz0ZwgFr8t1B+U8mANCZrxmdrs7mdOBJvDf9oYRZggQAnjw2zclckmciD9a/+GO7r5g1F/iV9L+1TB1oTksAVlAZ0Ck707XCy0WoMnSayK5u+K8OFWmuMaqho+CiGvewt0mHR84= Received: by 10.70.57.18 with SMTP id f18mr8936768wxa.89.1202567956404; Sat, 09 Feb 2008 06:39:16 -0800 (PST) Received: by 10.70.28.5 with HTTP; Sat, 9 Feb 2008 06:39:16 -0800 (PST) Message-ID: Date: Sat, 9 Feb 2008 19:39:16 +0500 From: "Shoaib Mir" To: "Mike Blackwell" Subject: Re: Character encoding conversion Cc: pgsql-admin@postgresql.org In-Reply-To: <47ADB8AA.6070305@sbcglobal.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3528_16262886.1202567956373" References: <47ADB8AA.6070305@sbcglobal.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/116 X-Sequence-Number: 28190 ------=_Part_3528_16262886.1202567956373 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 9, 2008 7:28 PM, Mike Blackwell wrote: > I have a database which was originally created with LATIN1 encoding. > I'd like to move it to UTF8. The data will load ok (COPY) but I am > getting 'invalid byte sequence for encoding..." messages when accessing > the data. > > Is there a way to automatically convert the offending characters, or to > easily locate them in a pg_dump file so they can be converted by hand? > > Try using 'iconv' for your dump file and convert it all to UTF8 first before restoring to a UTF8 database. -- Shoaib Mir Fujitsu Australia Software Technology shoaibm[@]fast.fujitsu.com.au ------=_Part_3528_16262886.1202567956373 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 9, 2008 7:28 PM, Mike Blackwell <maiku41@sbcglobal.net> wrote:
I have a database which was originally created with LATIN1 encoding.
I'd like to move it to UTF8.  The data will load ok (COPY)  but I am
getting 'invalid byte sequence for encoding..." messages when accessing
the data.

Is there a way to automatically convert the offending characters, or to
easily locate them in a pg_dump file so they can be converted by hand?



Try using 'iconv' for your dump file and convert it all to UTF8 first before restoring to a UTF8 database.

--
Shoaib Mir
Fujitsu Australia Software Technology
shoaibm[@]fast.fujitsu.com.au ------=_Part_3528_16262886.1202567956373--