pgsql: Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.

Started by Tatsuo Ishiiover 20 years ago6 messagescomitters
Jump to latest
#1Tatsuo Ishii
ishii@postgresql.org

Log Message:
-----------
Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

Problem reported by Sagi Bashari on 2005/12/21.
See "[BUGS] BUG #2120: Crash when doing UTF8<->ISO_8859_8 encoding conversion"
on pgsql-bugs list for more details.

Modified Files:
--------------
pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859:
utf8_and_iso8859.c (r1.16 -> r1.17)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c.diff?r1=1.16&amp;r2=1.17)

#2Neil Conway
neilc@samurai.com
In reply to: Tatsuo Ishii (#1)
Re: pgsql: Fix for rearranging encoding id ISO-8859-5

Tatsuo Ishii wrote:

Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

ISTM this patch, or some variant of it, should be applied to the
REL8_1_STABLE branch, and any earlier release branches that also exhibit
the problem.

-Neil

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#2)
Re: pgsql: Fix for rearranging encoding id ISO-8859-5

Neil Conway <neilc@samurai.com> writes:

Tatsuo Ishii wrote:

Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

ISTM this patch, or some variant of it, should be applied to the
REL8_1_STABLE branch, and any earlier release branches that also exhibit
the problem.

8.1 definitely needs to be fixed. I don't think there is a bug in 8.0,
though that should be double-checked.

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: pgsql: Fix for rearranging encoding id ISO-8859-5

Tom Lane wrote:

Neil Conway <neilc@samurai.com> writes:

Tatsuo Ishii wrote:

Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

ISTM this patch, or some variant of it, should be applied to the
REL8_1_STABLE branch, and any earlier release branches that also exhibit
the problem.

8.1 definitely needs to be fixed. I don't think there is a bug in 8.0,
though that should be double-checked.

8.0.X looked OK to me.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Tatsuo Ishii
ishii@postgresql.org
In reply to: Tom Lane (#3)
Re: pgsql: Fix for rearranging encoding id ISO-8859-5

Neil Conway <neilc@samurai.com> writes:

Tatsuo Ishii wrote:

Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

ISTM this patch, or some variant of it, should be applied to the
REL8_1_STABLE branch, and any earlier release branches that also exhibit
the problem.

8.1 definitely needs to be fixed. I don't think there is a bug in 8.0,
though that should be double-checked.

Back patch to 8.1 stable done.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

#6Tatsuo Ishii
ishii@postgresql.org
In reply to: Tom Lane (#3)
Re: pgsql: Fix for rearranging encoding id ISO-8859-5

Neil Conway <neilc@samurai.com> writes:

Tatsuo Ishii wrote:

Fix for rearranging encoding id ISO-8859-5 to ISO-8859-8.
Also make the code more robust by searching for target encoding
in the internal charset map.

ISTM this patch, or some variant of it, should be applied to the
REL8_1_STABLE branch, and any earlier release branches that also exhibit
the problem.

8.1 definitely needs to be fixed. I don't think there is a bug in 8.0,
though that should be double-checked.

Back patch to 8.1 stable done.
--
Tatsuo Ishii
SRA OSS, Inc. Japan