diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-02-12 21:15:19 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-02-12 21:15:19 +0000 |
commit | 2a5180c26e4769171a64cbc6827488fbcf349e38 (patch) | |
tree | d4fb1cfbcf99202b4e24afe975558ddc575da608 /src | |
parent | 1ac1526ea028739882f1a42a86fb71d5536ca3eb (diff) | |
download | postgresql-2a5180c26e4769171a64cbc6827488fbcf349e38.tar.gz postgresql-2a5180c26e4769171a64cbc6827488fbcf349e38.zip |
Throw a warning rather than an error on invalid character from UTF8 to
Latin1, like we do for other Latin encodings.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c index f9208ee89a6..30c15714af7 100644 --- a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c +++ b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v 1.13 2005/12/25 02:14:18 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v 1.14 2006/02/12 21:15:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -84,8 +84,10 @@ utf8_to_iso8859_1(PG_FUNCTION_ARGS) len -= 2; } else if ((c & 0xe0) == 0xe0) - elog(ERROR, "could not convert UTF8 character 0x%04x to ISO8859-1", - c); + ereport(WARNING, + (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), + errmsg("ignoring unconvertible UTF-8 character 0x%04x", + c))); else { *dest++ = c; |