Re: invalid byte sequence for encoding "UTF8": 0x00

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "JasmineLiu *EXTERN*" <liuyuanyuangogo(at)gmail(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: invalid byte sequence for encoding "UTF8": 0x00
Date: 2014-08-27 08:11:09
Message-ID: A737B7A37273E048B164557ADEF4A58B17D2EDBA@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

JasmineLiu wrote:
> I've also got this problem while copy or insert data from MS SQL Server to
> PostgreSQL.
> SQLServer 2008 R2, encoding :GBK
> PostgreSQL 9.3.4, encoding:UTF8
>
> Rather than modify the column value in sql server,
> are there any other ways to solve this problem?
> Better to give me an examples.

You will never be able to insert a null character into a PostgreSQL database.
You can either modify the source data or change the data in transit.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message JasmineLiu 2014-08-27 08:22:45 Re: invalid byte sequence for encoding "UTF8": 0x00
Previous Message JasmineLiu 2014-08-27 07:43:18 Re: invalid byte sequence for encoding "UTF8": 0x00

Browse pgsql-jdbc by date

  From Date Subject
Next Message JasmineLiu 2014-08-27 08:22:45 Re: invalid byte sequence for encoding "UTF8": 0x00
Previous Message JasmineLiu 2014-08-27 07:43:18 Re: invalid byte sequence for encoding "UTF8": 0x00