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

fix for wrong escape sequence #12

Merged
merged 2 commits into from
Jun 19, 2018
Merged

fix for wrong escape sequence #12

merged 2 commits into from
Jun 19, 2018

Conversation

mariopaumann
Copy link
Contributor

@mariopaumann mariopaumann commented Jun 15, 2018

string values like \" are encoded as \\" which leads to an error when uploading to influxdb.
\\\" seems to work.

i added a unittest to reflect this situation and a fix as well

Thank you, Mario

@mariopaumann mariopaumann changed the title added unittest for wrong escape sequence fix for wrong escape sequence Jun 19, 2018
@domm
Copy link
Owner

domm commented Jun 19, 2018

Hm, strange, because the docs say that \ does not have to be escaped:

"Line Protocol does not require users to escape the backslash character "

https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_reference/#special-characters

But I guess the problem only occurs for backslash followed by double quotes \" which is (per the docs) escaped as \\"?

I'll have to feed some examples to influx to figure out what the actual problem is...

But thanks for the patch!

@domm
Copy link
Owner

domm commented Jun 19, 2018

influxdata/influxdb#8728

But not sure what this means for this issue..

@domm
Copy link
Owner

domm commented Jun 19, 2018

ok, according to influxdata/docs.influxdata.com-ARCHIVE#1295 escaping the \ in field values is ok, and they will adapt the docs. So I'm going to accept this patch and push a new release ASAP

@domm domm merged commit 11cf054 into domm:master Jun 19, 2018
@domm
Copy link
Owner

domm commented Jun 19, 2018

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

Successfully merging this pull request may close these issues.

2 participants