Special Invisible Unicode characters should be highlighted (or replaced) #75

Closed
cansik opened this Issue Sep 23, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@cansik

cansik commented Sep 23, 2015

I have a problem when I try to use the SQL Query Textbox to create my database Schema. If I copy my SQL form the PyCharm IDE, there are some signs copied which should not be there. If I run the query, this is the output:

ERROR:  syntax error at or near "
CREATE"
LINE 2: 
CREATE VIEW "query_view" AS  SELECT prov.name AS provenance...
        ^
Query failed
PostgreSQL said: syntax error at or near "
CREATE"

Maybe it's a failure of the copy function of PyCharm, but would be great If Postico would "clean" the inserted text.

Here the query:

-- Query View

CREATE VIEW "query_view" AS  SELECT prov.name AS provenance,
    pgt.name AS property_group_type,
    pg.fc_id,
    pg.time_start,
    pg.nar,
 ....
@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Sep 23, 2015

Owner

Might be non-breaking spaces or similar. If you email me the query, I can investigate: jakob@eggerapps.at

Am 23.09.2015 um 10:16 schrieb Florian Bruggisser notifications@github.com:

I have a problem when I try to use the SQL Query Textbox to create my database Schema. If I copy my SQL form the PyCharm IDE, there are some signs copied which should not be there. If I run the query, this is the output:

ERROR: syntax error at or near "
> CREATE"
LINE 2: 
> CREATE VIEW "query_view" AS SELECT prov.name AS provenance...
^
Query failed
PostgreSQL said: syntax error at or near "
CREATE"
Maybe it's a failure of the copy function of PyCharm, but would be great If Postico would "clean" the inserted text.

Here the query:

-- Query View

> CREATE VIEW "query_view" AS SELECT prov.name AS provenance,
> pgt.name AS property_group_type,
> pg.fc_id,
> pg.time_start,
> pg.nar,
> ....

Reply to this email directly or view it on GitHub.

Owner

jakob commented Sep 23, 2015

Might be non-breaking spaces or similar. If you email me the query, I can investigate: jakob@eggerapps.at

Am 23.09.2015 um 10:16 schrieb Florian Bruggisser notifications@github.com:

I have a problem when I try to use the SQL Query Textbox to create my database Schema. If I copy my SQL form the PyCharm IDE, there are some signs copied which should not be there. If I run the query, this is the output:

ERROR: syntax error at or near "
> CREATE"
LINE 2: 
> CREATE VIEW "query_view" AS SELECT prov.name AS provenance...
^
Query failed
PostgreSQL said: syntax error at or near "
CREATE"
Maybe it's a failure of the copy function of PyCharm, but would be great If Postico would "clean" the inserted text.

Here the query:

-- Query View

> CREATE VIEW "query_view" AS SELECT prov.name AS provenance,
> pgt.name AS property_group_type,
> pg.fc_id,
> pg.time_start,
> pg.nar,
> ....

Reply to this email directly or view it on GitHub.

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Sep 23, 2015

Owner

It looks like the query contains the unicode LINE SEPARATOR character, which PostgreSQL does not understand.

Since problems with odd unicode characters appear to be common (another example is issue #25), I'll investigate ways to detect and highlight or remove these types of characters in Postico.

Owner

jakob commented Sep 23, 2015

It looks like the query contains the unicode LINE SEPARATOR character, which PostgreSQL does not understand.

Since problems with odd unicode characters appear to be common (another example is issue #25), I'll investigate ways to detect and highlight or remove these types of characters in Postico.

@jakob jakob changed the title from Copy and Paste SQL Query Textbox to Special Invisible Unicode characters should be highlighted (or replaced) Sep 30, 2015

@jakob jakob added the enhancement label Sep 30, 2015

@jakob jakob added the started label Nov 22, 2015

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Nov 23, 2015

Owner

Postico 1.0.1 now automatically converts LINE SEPARATOR to LINEFEED, which should fix this issue. More info: https://eggerapps.at/postico/changelist.html

Owner

jakob commented Nov 23, 2015

Postico 1.0.1 now automatically converts LINE SEPARATOR to LINEFEED, which should fix this issue. More info: https://eggerapps.at/postico/changelist.html

@jakob jakob closed this Nov 23, 2015

@gajus

This comment has been minimized.

Show comment
Hide comment
@gajus

gajus Apr 14, 2017

@jakob I ran into a similar issue when copy-ing text from CLI that contains colour characters. It put me really off-track:

screen shot 2017-04-14 at 12 41 32

gajus commented Apr 14, 2017

@jakob I ran into a similar issue when copy-ing text from CLI that contains colour characters. It put me really off-track:

screen shot 2017-04-14 at 12 41 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment