Re: 7.3.2 incorrectly counts characters for unicode varchar field

From: "Matthew Cooper" <matty(at)cloverworxs(dot)com>
To: "Matthew Cooper" <matty(at)cloverworxs(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: 7.3.2 incorrectly counts characters for unicode varchar field
Date: 2003-09-15 17:27:01
Message-ID: 002f01c37bae$92bcf990$6600030a@gateway01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Doh! It looks like its time to eat humble pie. It turns out that the guy
here who has 7.3.4 and helped me to reproduce the problem did not follow our
own installation instructions (that he recently re-worded!) as follows:

"createdb -E UNICODE -U DB_USER -P DB_PASSWORD DB_NAME"

and did not set the encoding. I, like a good boy, did on my 7.2
installation. The guys I am trying to debug the problem for are in another
location and are using 7.3.4 too. Hence I narrowed it down to a version
problem. I am asking them to check the encoding on their database too and
will post back with huge apologies and thanks for your time when they
inevitably confirm that the encoding is SQL_ANSI.

Thanks, Matty.
----- Original Message -----
From: "Matthew Cooper" <matty(at)cloverworxs(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Sent: Monday, September 15, 2003 9:50 AM
Subject: Re: [BUGS] 7.3.2 incorrectly counts characters for unicode varchar
field

> Attached is the UTF-8 encoded sql file in case it got messed up in the
mail
> transfer.
>
> And here it is pasted in directly from the window that was displaying
> chinese characters.
>
> insert into mgc values ('分钟练习分钟练习练习');
>
>
> Looking at the UTF-8 documentation, 10 chinese characters could be any
> number of bytes, each character being say 2 or 3 characters.
>
> Matty.
> ----- Original Message -----
> From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: "Matthew Cooper" <matty(at)cloverworxs(dot)com>
> Cc: <pgsql-bugs(at)postgresql(dot)org>
> Sent: Saturday, September 13, 2003 5:51 PM
> Subject: Re: [BUGS] 7.3.2 incorrectly counts characters for unicode
varchar
> field
>
>
> > > insert into mgc values ('Ã¥Ë?â? éâ?TŸç»Æ'ä¹ Ã¥Ë?â?
> éâ?TŸç»Æ'ä¹ ç»Æ'ä¹ ');
> >
> > I don't think this string is correctly unicode-encoded. Anyway "length"
> > claims it is 30 characters.
> >
> > regards, tom lane
> >
>

Browse pgsql-bugs by date

  From Date Subject
Next Message Gaetano Mendola 2003-09-15 22:14:26 Re: PostgreSql 7.3.4 & 7.4 on MacOS X
Previous Message Tom Lane 2003-09-15 15:10:19 Re: 7.3.2 incorrectly counts characters for unicode varchar field