Re: Postgresql and scripting - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Postgresql and scripting
Date
Msg-id 20040908015602.GB7556@dcc.uchile.cl
Whole thread Raw
In response to Re: Postgresql and scripting  (Jerome Lyles <susemail@hawaii.rr.com>)
List pgsql-general
On Tue, Sep 07, 2004 at 01:33:08PM -1000, Jerome Lyles wrote:
> On Tuesday 07 September 2004 01:50 am, John DeSoi wrote:
> > On Sep 7, 2004, at 7:24 AM, Jerome Lyles wrote:
> > > test-# \i create.txt
> > > psql:create.txt:1: ERROR:  syntax error at or near "" at character 1
> > >
> > > Here is the top of the script:
> > > ------------------------------------------------------------
> > >  - -   S a m s   T e a c h   Y o u r s e l f   S Q L   i n   1 0   M i
> > > n u t e
> >
> > It seems that your file might be in unicode (utf-16) since it appears
> > there is whitespace after every character. Check your editor settings
> > and resave the file.

> Right now it's in unicode (utf-8), switching between utf 8 and sixteen has no
> effect on the spaces between letters.  Tried iso 8859-1 and iso 8859-15 but
> the editor window was empty for these encodings.

Did you try using recode?

recode utf16..iso8859-15 filename

Of course, just changing the encoding setting in the editor does not
automatically recode the file, does it?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ni aun el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)


pgsql-general by date:

Previous
From: David Garamond
Date:
Subject: Re: Restoring dump of multiuser databases
Next
From: David Garamond
Date:
Subject: Re: Salt in encrypted password in pg_shadow