Skip to content

fix(web-console): remove file separator symbol from queryRaw result#18

Closed
argshook wants to merge 1 commit into
mainfrom
web-console/remove-file-separator-symbol-from-query-result
Closed

fix(web-console): remove file separator symbol from queryRaw result#18
argshook wants to merge 1 commit into
mainfrom
web-console/remove-file-separator-symbol-from-query-result

Conversation

@argshook

Copy link
Copy Markdown
Contributor

QuestDB might return data which can include non printing symbols, like
File Separator

Such symbol is not a valid token for JSON.parse, so code like
JSON.parse(stringWithFileSeparatorSymbol) breaks

This change simply removes that symbol. It is a non-printing symbol so
it should not be displayed in the web console grid anyway.

QuestDB might return data which can include non printing symbols, like
[File Separator](https://unicode-table.com/en/001C/)

Such symbol is not a valid token for `JSON.parse`, so code like
`JSON.parse(stringWithFileSeparatorSymbol)` breaks

This change simply removes that symbol. It is a non-printing symbol so
it should not be displayed in the web console grid anyway.
@argshook argshook self-assigned this Jun 28, 2022
@puzpuzpuz puzpuzpuz added the bug Something isn't working label Jun 29, 2022
@puzpuzpuz

Copy link
Copy Markdown
Contributor

Maybe it's better for us to remove illegal chars on the server side? This way not only Web Console, but any HTTP API client would be able to parse the result set. @bziobrowski WDYT?

I'd also propose checking other potentially problematic chars (maybe codepoints U+D800 to U+DFFF? something else?)

@argshook

argshook commented Jun 29, 2022

Copy link
Copy Markdown
Contributor Author

Maybe it's better for us to remove illegal chars on the server side? This way not only Web Console, but any HTTP API client would be able to parse the result set. @bziobrowski WDYT?

me and @bziobrowski had a two sentence discussion about removing such symbols on server, but concluded that QuestDB should not do that, as strings can contain arbitrary symbols. Removing things might be unexpected by the user.

On the other hand, since web console only previews data, any non-printing chars can be removed here.

@bziobrowski bziobrowski closed this Jul 1, 2022
@bziobrowski

Copy link
Copy Markdown
Contributor

Closing PR because I added nonprintable char encoding in JSON responses returned by backend .

@bziobrowski bziobrowski deleted the web-console/remove-file-separator-symbol-from-query-result branch July 1, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants