Re: problem converting database to UTF-8

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: problem converting database to UTF-8
Date: 2009-01-22 20:56:49
Message-ID: 200901221256.49166@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 22 January 2009, Vladimir Konrad <vk(at)dsl(dot)pipex(dot)com> wrote:
> > iconv does not change the database encodings embedded in the file
> > (and it is quite large).
>
> Have you read the manual?
>
> file A pathname of an input file. If no file operands are
> specified, or if a file operand is '-', the standard input shall
> be used.
>
>
> cat the-source-dump.sql | iconv -t utf8 - > my-converted.sql
>
> Size should not matter in this case...

Yeah it does. iconv buffers everything in memory, as I recall.

However, you can "split" the file into manageable pieces, run each through
iconv, and recombine afterwards.

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Goodenough 2009-01-22 20:59:56 Re: problem converting database to UTF-8
Previous Message Vladimir Konrad 2009-01-22 20:42:41 Re: problem converting database to UTF-8