Stranger Character Input Bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Stranger Character Input Bug

Aetimpani Yeatina
Hi. I suppose found a bug. I have explained that on stackoverflow (Link: https://stackoverflow.com/questions/62535206/postgresql-doesnt-respond-when-i-input-stranger-character-on-cmd )
Reply | Threaded
Open this post in threaded view
|

AW: Stranger Character Input Bug

Wilm Hoyer

> Hi. I suppose found a bug. I have explained that on stackoverflow (Link: https://stackoverflow.com/questions/62535206/postgresql-doesnt-respond-when-i-input-stranger-character-on-cmd )

I think, this is a limitation oft he windows command shell, not a PostgreSQL bug (i’m not a PostgreSQL developer, so i might be wrong on that point)

 

You might give any of the following workarounds a try:

- Microsoft is currently working on „Windows Terminal“ with full UTF-8 character support – you can download a beta of that software from Microsoft Store.

- Use a third Party Command Line Tool

- Use the PostgreSQL Unicode Escape Syntax for literals for your input values – see https://www.postgresql.org/docs/current/sql-syntax-lexical.html

      e.g. insert into jobs(id, name) values (10, E'a\uxxxxs\uxxxx') – you have to replace the xxxx with the unicode codepoint value of the character

- Use the „Linux on Windows Subsystem“ Windows 10 feature – inside the Linux distribution you choose as your subsystem, you can use a shell with full unicode character set support for your commands

 

As a side note: IIRC the windows power shell suffers from the same limitations as the command line tool, so using that toll as workaround will not help with your problem.

 

Regards

Wilm.