Skip site navigation (1) Skip section navigation (2)

RE: 7.0.3 dumps aren't accessible via JDBC in 7.1

From: "Rainer Mager" <rmager(at)vgkk(dot)com>
To: "Peter T Mount" <peter(at)retep(dot)org(dot)uk>, <pgsql-bugs(at)postgresql(dot)org>, <pgsql-bugs(at)postgresql(dot)org>
Subject: RE: 7.0.3 dumps aren't accessible via JDBC in 7.1
Date: 2001-04-22 23:48:18
Message-ID: NEBBJBCAFMMNIHGDLFKGKECIDKAA.rmager@vgkk.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi Peter and all,

	I may have described this poorly, let me try again.

1. We have a Unicode database that has a particular dash character in it
that gets dumped incorrectly. When dumped (from 7.0.x) the dash becomes the
character 0xAD but is not properly encoded in UTF-8 (at least my limited
knowledge of UTF-8 says so). My understanding is that all characters above
0x7F should be encoded but this particular character is not encoded/escaped
at all in the dump.

2. The given dump can be imported into 7.1 without visible problem to 7.1.
The character in question can be viewed via queries in PSQL. The only time
that there is a problem is when the character is accessed via JDBC. If byte
array returned from the backend to the JDBC driver is supposed to be UTF-8
format but (I believe) is incorrectly formatted. The character in question
is, still, by itself as 0xAD and this is not valid UTF-8. When the Java
UTF-8 to internal Unicode converter hits this character it dies and the
resulting string is truncated right before the character. I think there may
be a bug in Java that an InvalidEncoding exception isn't thrown but
nonetheless the bytes aren't valid UTF-8.

3. My guess is that some part of Postgres' UTF-8 conversion routines are
wrong. I looked at the code but couldn't find the relavant parts.


I hope this is clearer.


Thanks,

--Rainer


> -----Original Message-----
> From: Peter T Mount [mailto:peter(at)retep(dot)org(dot)uk]
> Sent: Friday, April 20, 2001 8:13 PM
> To: rmager(at)vgkk(dot)com; pgsql-bugs(at)postgresql(dot)org; pgsql-bugs(at)postgresql(dot)org
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] 7.0.3 dumps aren't accessible via JDBC in 7.1
>
>
> Hmmm, this sounds like either a backend issue, or something is
> misconfigured.
> Have you got unicode support enabled in the backend?
>
> Peter
>
> --
> Peter Mount peter(at)retep(dot)org(dot)uk
> PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
> RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/


In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-04-23 01:08:14
Subject: select a.name ... union select a.name ... order by a.name fails in 7.1
Previous:From: Palle GirgensohnDate: 2001-04-22 22:05:20
Subject: select a.name ... union select a.name ... order by a.name fails in 7.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group