latin1 unicode conversion errors

From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: latin1 unicode conversion errors
Date: 2006-02-03 11:22:46
Message-ID: Pine.BSO.4.61.0602030618260.25008@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Why is latin1 special in its conversion from unconvertible unicode data?
Other latin character sets add a warning, but latin1 errors out.

jurka=# create database utf8 with encoding ='utf8';
CREATE DATABASE
jurka=# \c utf8
You are now connected to database "utf8".
utf8=# create table t(a text);
CREATE TABLE
utf8=# insert into t values ('\346\231\243');
INSERT 0 1
utf8=# set client_encoding = 'latin2';
SET
utf8=# select * from t;
WARNING: ignoring unconvertible UTF-8 character 0xe699a3
a
---

(1 row)

utf8=# set client_encoding = 'latin1';
SET
utf8=# select * from t;
ERROR: could not convert UTF8 character 0x00e6 to ISO8859-1

Kris Jurka

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-02-03 11:59:00 Re: latin1 unicode conversion errors
Previous Message andrew 2006-02-03 09:46:26 look up tables while parsing queries