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

From Peter Eisentraut
Subject Re: Bug #837: Unable to use LATIN9 (=ISO-8859-15) encoding
Date
Msg-id Pine.LNX.4.44.0212092011490.25355-100000@localhost.localdomain
Whole thread Raw
In response to Bug #837: Unable to use LATIN9 (=ISO-8859-15) encoding  (pgsql-bugs@postgresql.org)
List pgsql-bugs
> >From PSQL, if I perform:
> \encoding LATIN9
> insert into i18ntest(id, data) values('Euro symbol', '¤');
>
> 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 "¤", 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:192002 
--- 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@gmx.net

pgsql-bugs by date:

Previous
From: Bartosch Pixa
Date:
Subject: Re: cube does not compile with newer flex
Next
From: Peter Eisentraut
Date:
Subject: Re: Bug #838: SSL problems in 7.3