[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [gopher] Line terminators in Gopher transactions



On 23/05/2012 03:13, Nick Matavka wrote:
If I am sending a text file through Gopher, is it the job of the
server to ensure that the file uses CRLF?  Or is it the job of the
client to properly interpret whatever line ending the server chooses
to use?


In my personal opinion it should always be the client's duty as you never know what you will receive from a server you have to make a best effort to render it correctly. In an *ideal world* there would be a common standard for line endings in ascii files but this isn't such a world and history has presented us with different encodings in different files.

I certainly wouldn't advocate servers trying to be "intelligent" and mangling files because even when ensuring you are only mangling text files it can cause unnecessary hassle. [1]

I see Gopher as a transit mechanism for data, that is to say the client and server both exist to get data from one place to another and they should do it without changing that data.

It's 4.00 AM and I fear I'm rambling on here... Basically my view is "when serving a file: never change the line endings" and "when displaying the contents of a text file in a client: interpret all possible encoding of line ends"

Alistair.

[1] I had an example of an "intelligent" computer causing me line-ending-grief recently; I was checking out a subversion repository for a *nix centric project on windows. Together the client and the server conspired to decide that because I was on windows it would be helpful to muck about with the line endings. Unfortunately when I then tried to run some of the scripts in bash they of course crashed all over the place! It took me a while to discover what had been done to the files and I never did find a way to convince the client to just check the files out without interference. In the end I just ran dos2unix recursively over the whole source tree so I could get on with it *sigh*

_______________________________________________
Gopher-Project mailing list
Gopher-Project@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project




Reply to: