postgis_restore.pl lost charset information

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

postgis_restore.pl lost charset information

xavan
My original database was in latin1 encoding.

I follow the procedure to dump and then restore the data in Postgis 1.0.0.

(postgis_restore.pl lwpostgis.sql roads roads.dump)

But the created database is in SQL_ASCII charset and I receive error in my
application using jdbc to retrieve data :

org.postgresql.util.PSQLException: Invalid character data was found.  This
is most likely caused by stored data containing characters that are invalid
for the character set the database was created in.  The most common example
of this is storing 8bit data in a SQL_ASCII database.

How can I change the charset of the created database before the import
procedure?

_________________________________________________________________


_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postgis_restore.pl lost charset information

strk
>From 1.0.1 CHANGES file:

        - NEW support for custom createdb options in postgis_restore.pl

Basically you pass createdb option last.
A no-args invocation of it shows usage.
I hope you still have your dump around.

--strk;

On Thu, May 26, 2005 at 12:05:47PM +0200, Xavier Vanderstukken wrote:

> My original database was in latin1 encoding.
>
> I follow the procedure to dump and then restore the data in Postgis 1.0.0.
>
> (postgis_restore.pl lwpostgis.sql roads roads.dump)
>
> But the created database is in SQL_ASCII charset and I receive error in my
> application using jdbc to retrieve data :
>
> org.postgresql.util.PSQLException: Invalid character data was found.  This
> is most likely caused by stored data containing characters that are invalid
> for the character set the database was created in.  The most common example
> of this is storing 8bit data in a SQL_ASCII database.
>
> How can I change the charset of the created database before the import
> procedure?
>
> _________________________________________________________________
>
>
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postgis_restore.pl lost charset information

xavan

I update manually the perl script to add the charset parameter.

And yes I already have the dump file ;-p




>From: [hidden email]
>Reply-To: PostGIS Users Discussion <[hidden email]>
>To: [hidden email]
>Subject: Re: [postgis-users] postgis_restore.pl lost charset information
>Date: Thu, 26 May 2005 22:25:12 +0200
>
> >From 1.0.1 CHANGES file:
>
>         - NEW support for custom createdb options in postgis_restore.pl
>
>Basically you pass createdb option last.
>A no-args invocation of it shows usage.
>I hope you still have your dump around.
>
>--strk;
>
>On Thu, May 26, 2005 at 12:05:47PM +0200, Xavier Vanderstukken wrote:
> > My original database was in latin1 encoding.
> >
> > I follow the procedure to dump and then restore the data in Postgis 1.0.0.
> >
> > (postgis_restore.pl lwpostgis.sql roads roads.dump)
> >
> > But the created database is in SQL_ASCII charset and I receive error in my
> > application using jdbc to retrieve data :
> >
> > org.postgresql.util.PSQLException: Invalid character data was found.  This
> > is most likely caused by stored data containing characters that are invalid
> > for the character set the database was created in.  The most common example
> > of this is storing 8bit data in a SQL_ASCII database.
> >
> > How can I change the charset of the created database before the import
> > procedure?
> >
> > _________________________________________________________________
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > [hidden email]
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>_______________________________________________
>postgis-users mailing list
>[hidden email]
>http://postgis.refractions.net/mailman/listinfo/postgis-users



_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Loading...