Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: failed to parse characters: Invalid UTF-8 sequence #19439

Open
fuyufjh opened this issue Nov 19, 2024 · 1 comment
Open

bug: failed to parse characters: Invalid UTF-8 sequence #19439

fuyufjh opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@fuyufjh
Copy link
Member

fuyufjh commented Nov 19, 2024

Describe the bug

As we discussed over the call, this is one of the issues I am facing while inserting ligatures like æ or ø to a table I am getting following error.

Error message/log

Caused by these errors (recent errors listed first):
  1: Invalid UTF-8 sequence
  2: invalid utf-8 sequence of 1 bytes from index 76

To Reproduce

CREATE TABLE t1
  (
     id      INT PRIMARY KEY,
     name    VARCHAR,
     address TEXT
  ); 

INSERT INTO t1 (id,name,address) VALUES(1,'Thømas', 'Vallanbæk Way');
But if I do this,
INSERT INTO t1 (id,name,address) VALUES(1,'Thømas', 'Vallanbk Strand'); 

removing æ from the value , then the insertion is success. But select * from will give 'o' instead of 'ø',

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

2.0

Additional context

No response

@fuyufjh fuyufjh added the type/bug Something isn't working label Nov 19, 2024
@github-actions github-actions bot added this to the release-2.2 milestone Nov 19, 2024
@xiangjinwu
Copy link
Contributor

xiangjinwu commented Nov 19, 2024

Cannot reproduce with RisingWave v2.0.1 as server and psql 16.0 as client.

It is likely the client is not sending in UTF-8. Waiting on user response.

dev=> CREATE TABLE t1
dev->   (
dev(>      id      INT PRIMARY KEY,
dev(>      name    VARCHAR,
dev(>      address TEXT
dev(>   ); 
CREATE_TABLE

dev=> INSERT INTO t1 (id,name,address) VALUES(1,'Thømas', 'Vallanbæk Way');
INSERT 0 1
dev=> select * from t1;
 id |  name  |    address    
----+--------+---------------
  1 | Thømas | Vallanbæk Way
(1 row)

dev=> INSERT INTO t1 (id,name,address) VALUES(1,'Thømas', 'Vallanbk Strand'); 
INSERT 0 1
dev=> select * from t1;
 id |  name  |     address     
----+--------+-----------------
  1 | Thømas | Vallanbk Strand
(1 row)
select convert_from('\xc3b8c3a6'::bytea, 'utf8');

@xiangjinwu xiangjinwu self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants