pgadmin-org / pgadmin-org/pgadmin4

"'rawunicodeescape' codec can't decode bytes in position 24-25: truncated \UXXXXXXXX escape" is displayed if user create table which contains multiple \ with SQL_ASCII encoding.

Open
#5,940 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

  • OS: [e.g. Windows]
  • Mode: [e.g Desktop]

Steps to reproduce the behaviour:

  1. create the following database:

CREATE DATABASE a_sql_asscci
WITH
OWNER = postgres
TEMPLATE = template0
ENCODING = 'SQL_ASCII'
CONNECTION LIMIT = -1
IS_TEMPLATE = False;
2. create the following table in a_sql_asscci:
CREATE TABLE public."C:\User\te"
(
"C:\User\te" "char" NOT NULL,
PRIMARY KEY ("C:\User\te")
);

ALTER TABLE IF EXISTS public."C:\User\te"
OWNER to postgres;
3. Table created
4. Click on the newly created table and view data
5. Error "'rawunicodeescape' codec can't decode bytes in position 24-25: truncated \UXXXXXXXX escape" is displayed

Expected behavior

View data should be working if user create table which contains multiple \ with SQL_ASCII encoding.

220867995-25d1c550-8679-4a2e-be8f-fd9429c53e5c

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by creating the SQL_ASCII database and table named with multiple backslashes, then use the table's View Data action. Trace the error from that entry point and verify that the table data can be viewed without the rawunicodeescape decoding error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.