Re: Bug #837: Unable to use LATIN9 (=ISO-8859-15) encoding

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: araqnid(at)debian(dot)org, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug #837: Unable to use LATIN9 (=ISO-8859-15) encoding
Date: 2002-12-09 19:48:18
Message-ID: Pine.LNX.4.44.0212092011490.25355-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> >From PSQL, if I perform:
> \encoding LATIN9
> insert into i18ntest(id, data) values('Euro symbol', '&#164;');
>
> then I would expect this to insert a euro symbol into the data column
> (code point 164 is Euro in ISO-8859-15). However, when I change back to
> UTF-8, the UTF-8 data is "Â&#164;", which is the currency symbol.

I have confirmed this. It appears to have been a copy and paste mistake.
I will put the following patch into the next subrelease (7.3.1):

*** ../pg73branch/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c Tue Oct 29 18:19:19 2002
--- src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c Mon Dec 9 20:14:43 2002
***************
*** 98,104 ****
{PG_LATIN8, LUmapISO8859_14, ULmapISO8859_14,
sizeof(LUmapISO8859_14) / sizeof(pg_local_to_utf),
sizeof(ULmapISO8859_14) / sizeof(pg_utf_to_local)}, /* ISO-8859-14 Latin 8 */
! {PG_LATIN9, LUmapISO8859_2, ULmapISO8859_2,
sizeof(LUmapISO8859_15) / sizeof(pg_local_to_utf),
sizeof(ULmapISO8859_15) / sizeof(pg_utf_to_local)}, /* ISO-8859-15 Latin 9 */
{PG_LATIN10, LUmapISO8859_16, ULmapISO8859_16,
--- 98,104 ----
{PG_LATIN8, LUmapISO8859_14, ULmapISO8859_14,
sizeof(LUmapISO8859_14) / sizeof(pg_local_to_utf),
sizeof(ULmapISO8859_14) / sizeof(pg_utf_to_local)}, /* ISO-8859-14 Latin 8 */
! {PG_LATIN9, LUmapISO8859_15, ULmapISO8859_15,
sizeof(LUmapISO8859_15) / sizeof(pg_local_to_utf),
sizeof(ULmapISO8859_15) / sizeof(pg_utf_to_local)}, /* ISO-8859-15 Latin 9 */
{PG_LATIN10, LUmapISO8859_16, ULmapISO8859_16,

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2002-12-09 19:48:47 Re: Bug #838: SSL problems in 7.3
Previous Message Bartosch Pixa 2002-12-09 19:20:54 Re: cube does not compile with newer flex