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

protocol: non-space whitespace does not round trip correctly via Encode/StreamParser #12

Open
rogpeppe opened this issue Sep 4, 2020 · 1 comment

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented Sep 4, 2020

There are special cases in the code to escape tab, newline, carriage-return and form-feed when encoding line-protocol values.
It seems that those cases aren't respected correctly when decoding.

For example, this code fails because it can't parse the line that has been encoded.

This code fails because the value has been silently changed when round tripping.

I appreciate that the encoding conventions probably can't change, but perhaps we could consider returning an error when the encoded values include these characters, to avoid this potential trip hazard.

@rogpeppe
Copy link
Contributor Author

rogpeppe commented Sep 4, 2020

Other potential round-tripping problems:

  • backslash is treated as special when unquoting but not quoting
  • escaped-double-quote is treated as special when unquoting (there's a // ??? comment in the code) but not when quoting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant