vfxparad0x / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Docs get removes blank lines from text file #372

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. google docs get source_file dest_file --format=txt

What is the expected output? What do you see instead?
The original file has blank lines.  I expect to see these blank lines in the 
downloaded text file. What I see instead is a file that has no blank lines.

For instance, if the original file looks like,
paragraph1

paragraph2

paragraph3

the downloaded text file looks like,
paragraph1
paragraph2
paragraph3

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?
googlecl version: 0.9.12
OS: RHEL-5.2 (also OS X 10.6)
gdata version: 2.0.13

Original issue reported on code.google.com by hutton.e...@gmail.com on 1 Mar 2011 at 6:22

GoogleCodeExporter commented 8 years ago
The Issue 301 is the opposite to this one: it talks about added lines on text 
files. There is a test case on comments which may help to deteremine what is 
happening.

Original comment by ferranb@gmail.com on 1 Mar 2011 at 6:33

GoogleCodeExporter commented 8 years ago
Thanks for that.  Here are some similar test to those in #301,

> printf "a\r\n b\n\n\nc" > test_up.txt
> google docs upload test_up.txt
> google docs get test_up --format=txt test_down
> hexdump -c test_up.txt
0000000   a  \r  \n       b  \n  \n  \n   c
> hexdump -c test_down.txt
0000000 357 273 277   a  \r  \n   b  \r  \n   c

A few weird things.
* The downloaded file now begins with a byte-order mark to indicate UTF-8 (0xFF 
0xBB 0xBF)
* line feeds are converted to carriage return/line feed pairs
* The space before the 'b' is gone

I should also note that this started about two days ago.

Original comment by hutton.e...@gmail.com on 1 Mar 2011 at 7:15

GoogleCodeExporter commented 8 years ago
And, or course, the two blank lines are gone!

Original comment by hutton.e...@gmail.com on 1 Mar 2011 at 7:28

GoogleCodeExporter commented 8 years ago
Like in Issue 301, it seems to be a problem in the Google Docs side. 

It would be interesting to see if it also happens uploading and downloading 
throught the web browser.

Original comment by ferranb@gmail.com on 1 Mar 2011 at 7:31

GoogleCodeExporter commented 8 years ago
I agree, it does sound like a google docs issue. I'll just cross my finers, 
then. Sorry to bug you guys.

Yes, it does also happen if uploading and downloading through a browser.

Original comment by hutton.e...@gmail.com on 1 Mar 2011 at 8:34

GoogleCodeExporter commented 8 years ago
Seems like this was brought up in the help forums as well: 
http://www.google.vu/support/forum/p/Google+Docs/thread?tid=2f2c5abe92f34a32&hl=
en

Hopefully, it does better than this thread: 
http://www.google.com.bz/support/forum/p/Google+Docs/thread?tid=23b9b6626072c9f4
&hl=en

Anyway, it would be nice to detect these things, so I'll mark this an accepted 
enhancement request.

Original comment by tom.h.mi...@gmail.com on 3 Mar 2011 at 2:13

GoogleCodeExporter commented 8 years ago
Cool.  Thanks.  Yeah, I brought it up in the help forums after figuring out is 
was a GDocs issue.

Original comment by hutton.e...@gmail.com on 3 Mar 2011 at 11:35

GoogleCodeExporter commented 8 years ago
I am having this problem too.

Command-line editing via vim (for example) does not see blank lines in the doc 
file.

This is a severe bug, as it makes command-line editing of LaTeX source files 
(for example) utterly impossible  ... the point being that blank lines have 
meaning in LaTeX, and in many other languages too. 

Original comment by jasid...@gmail.com on 6 Mar 2011 at 6:02

GoogleCodeExporter commented 8 years ago
This bugs me too!

Original comment by dim...@gmail.com on 15 Apr 2011 at 8:08