Character with byte sequence 0xa2 0xa3 in encoding "EUC_CN" has no equivalent in encoding "UTF8"

From: Zhongpu Chen <chenloveit(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Character with byte sequence 0xa2 0xa3 in encoding "EUC_CN" has no equivalent in encoding "UTF8"
Date: 2026-05-01 13:59:18
Message-ID: CA+1gyqL7uiQhfLcYWpHNUKQgHjQc7sOPthSTiaxLDZzcrGFYSg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

## Description

The legacy encodings allow some invalid bytes, which will cause errors
during SELECT operations.

## How to reproduce

```shell
createdb -E EUC_CN -T template0 --locale=C demo_euc_cn_db
```

```sql
demo_euc_cn_db=# CREATE TABLE t(id int, s varchar(10));

demo_euc_cn_db=# INSERT INTO t VALUES(1, E'\xA2\xA3');
INSERT 0 1
demo_euc_cn_db=# SELECT * FROM t WHERE id = 1;
ERROR: character with byte sequence 0xa2 0xa3 in encoding "EUC_CN" has no
equivalent in encoding "UTF8"
```

--
Zhongpu Chen

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Junwang Zhao 2026-05-01 15:07:16 Re: Character with byte sequence 0xa2 0xa3 in encoding "EUC_CN" has no equivalent in encoding "UTF8"
Previous Message Andrey Borodin 2026-05-01 12:20:00 Re: BUG #19362: Extremely log processing of jsonb_path_exists_opr