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

UTF-8 Byte Order Mark with leading double-quote results in parsing error #36

Closed
ideoplex opened this issue Oct 27, 2014 · 1 comment
Closed

Comments

@ideoplex
Copy link

As an FYI, it doesn't seem to like the Byte Order Mark with a leading double quote:

$ od -c sample.csv
0000000 357 273 277   "   i   d   "   ,   n   a   m   e   ,   v   a   l
0000020   u   e  \n   1   ,   "   A   n   d   r 303 251   ,   R 303 242
0000040   "   ,   5  \n   2   , 303 216   P 303 250   ,   1   6  \n
0000057
$ textql -source sample.csv -sql 'select * from tbl'
2014/10/27 14:52:38 line 1, column 1: bare " in non-quoted-field
$ od -c sample.csv
0000000 357 273 277   i   d   ,   n   a   m   e   ,   v   a   l   u   e
0000020  \n   1   ,   "   A   n   d   r 303 251   ,   R 303 242   "   ,
0000040   5  \n   2   , 303 216   P 303 250   ,   1   6  \n
0000055
$ textql -source sample.csv -sql 'select * from tbl'
id,name,value
1,"André,Râ",5
2,ÎPè,16

I'm using Windows 7, cygwin, go 1.3.3.

@dinedal
Copy link
Owner

dinedal commented Dec 18, 2015

This should work now.

$ textql -header -sql '*' sample.csv
1,"André,Râ",5
2,ÎPè,16

If you are still having trouble, can you upload the same data to a gist via the Add File button? This will make sure that I am getting the same data you are testing with.

Thank you!

@dinedal dinedal closed this as completed Dec 18, 2015
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

2 participants