Re: not valid character for Unicode

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: not valid character for Unicode
Date: 2006-06-09 15:25:43
Message-ID: 43932.216.41.12.254.1149866743.squirrel@webmail.webopticon.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, June 9, 2006 11:17 am, Adam Witney wrote:
>

>
> Martijn van Oosterhout wrote:
>
>> On Fri, Jun 09, 2006 at 03:59:52PM +0100, Adam Witney wrote:
>>
>>> Hi,
>>>
>>>
>>> Im trying to upgrade from 7.4 -> 8.1 but it is failing with Unicode
>>> errors. The offending character is the greek character mu (often used
>>> for micro). Here is an offending string "BµG(at)S" (in case it doesn't
>>> appear in the email, the mu is between the B and the G)
>>>
>>> Any ideas why this character is not valid in Unicode?
>>>
>>
>> It's a valid unicode character, it's just you havn't encoded it in
>> unicode. It's probably in Latin-1. In that case, you need to specify it
>> in the client encoding...
>
> Hi Martijn,
>
>
> thanks for your quick response.
>
> Ok i am a bit confused by all this encoding stuff... i don't really know
> how to encode it in unicode? this is a text string that is extracted from a
> text file, i just put it in an INSERT statement.
>
> I have to replace fields with this in it with a valid string that will
> load into 8.1, do you know who i would do the conversion?

For migration, you should pg_dump- it's not clear from your email whether
you are doing that. If you typed up some sql in Windows which you want to
load into postgres, you might try:
set client_encoding to 'LATIN1';
at the top of your script.

-M

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dirk Lutzebäck 2006-06-09 15:27:47 Re: How to set the global OID counter? COPY WITH OIDS does
Previous Message Martijn van Oosterhout 2006-06-09 15:25:02 Re: not valid character for Unicode