Oskar Sandberg wrote:
> 
> Now that the protocol is in Limbo anyways (and per Scott's idea) I would like
> to go ahead and change it so that all fields that contain String values are
> quoted, either by quotation marks around the string or a single ' at the
> beginning of the field value.

The quotation marks around the string are prettier...
But if you do that you need to propose some way to quote them within the
string. But since we need a way to quote newlines etc. anyways, quoting 
the quotation marks (duh...) won't hurt much. I personally like the
way it's done in URLs (%22 = ") but the usual quoting with a backslash
(\" = " and \n = newline and \\ = \) is more human readable, but also
more complicated to parse.

BTW am I right in the assumption that all string fields are to be UTF-8
encoded ? if so, does UTF-8 by itself allow for a way to quote those 
characters ? Or do we just say "the string is represented as UTF-8,
and after that encoding is done, we quote the few characters that
need quoting." ?


> Being able to tell when reading a field whether it is a string or a value 
> would
> make parsing the protocol a lot easier, since as it is now I don't know which
> fields are until somebody calls the get() method of the FieldSet with a 
> numeric
> default value.

Yes, that's a good point.

CU,
  Philipp

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to