Re: [Pmt-exif] "keyword=valueline" syntax
Brought to you by:
glennrp
From: Adam M. C. <am...@cs...> - 2000-08-07 21:20:33
|
Glenn Randers-Pehrson <gl...@ho...> wrote: > Do you mind if I copy some of our correspondence from png-list, to > place this in context? Not at all. > The valueline can be empty and it can contain any characters allowed > in PNG text chunks except for the newline. Right. This reminds me that we need to be a little careful if we start talking about newlines in values. If we think of a value as a sequence of lines, then there's nothing to be confused about: firstkey=one secondkey=two =three thirdkey =four =five Clearly, the value of firstkey is one line, the values of secondkey and thirdkey are each two lines. But if we think of a value as a sequence of characters, some of which may be newline characters, then the question arises of whether the value of firstkey is "one" or "one\n", and whether the value of secondkey is "two\nthree" or "two\nthree\n", and so on. In other words, we need to decide whether the lines of the value are separated by newline characters or terminated by newline characters. If we opt for terminated, then every value ends with a newline, so you can't assign an empty string. If we opt for separated, then you can always force an extra newline using a blank line; for example, you could assign "two\nthree\n" using: foo =two =three = AMC |