Loading ...
Sorry, an error occurred while loading the content.

[sgf-std] escape

Expand Messages
  • mikke
    The standard state for FF[4]: Property value: private properties may use one of the value types defined in this document or define their own value type. When
    Message 1 of 2 , Sep 3, 2002
    • 0 Attachment
      The standard state for FF[4]:
      Property value: private properties may use one of the value types defined in
      this document or define their own value type. When using a private value type
      the application has to escape every "]" with a leading "\". Otherwise the file
      would become unparseable. Should the value type be a combination of two
      simpler types then it's suggested that your application uses the Compose type.

      This is the only requirement that I can find on the value of a private property.

      As I understand it, the only character that it is necessary to escape is "]". The
      "\" the escape character does not need to be escaped. Does this imply that
      private properties can not escape the "\", even if they would like to? If they
      could wouldn't it make it hard to interpret?

      PP[\\]MA[dd] - Where PP is a private property.

      I thought that it was necessary to escape "\" until I reread the specification.

      Regards,
      Mikael Thulin

      PS How does current applications handle this?
    • Arno Hollosi
      Mikael, ... There are no rules what you can or cannot do inside a private property. Now I agree that omitting to mention that has to be escaped is a
      Message 2 of 2 , Sep 4, 2002
      • 0 Attachment
        Mikael,

        > As I understand it, the only character that it is necessary to escape is
        > "]". The "\" the escape character does not need to be escaped. Does this
        > imply that private properties can not escape the "\", even if they would
        > like to? If they could wouldn't it make it hard to interpret?

        There are no rules what you can or cannot do inside a private property. Now I
        agree that omitting to mention that '\' has to be escaped is a mistake, but
        hardly one, which is incorrectable. IIRC, SGFC treats '\' as a general escape
        char, thus in e.g. 'XX[\\]B[aa]' the property value of XX is "\\" (not
        "[\\]B[aa").

        I think that just about every program handles it in the same way. Anyway, this
        was clearly the intention of the spec. I will clarify that '\' itself has to
        be escpaed as well.


        /Arno

        p.s. apart from that, having a private property that contains something like
        [...\\] looks like a pathologic case to me.
      Your message has been successfully submitted and would be delivered to recipients shortly.