kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #03817
Re: Re: We should decide a quoting convention...
--00032555a33a991add047b56f88a Content-Type: text/plain; charset=UTF-8
2009/12/22 vladimir_uryvaev <vovanius@...>
>
>
>
> --- In kicad-devel@xxxxxxxxxxxxxxx <kicad-devel%40yahoogroups.com>, Dick
> Hollenbeck <dick@...> wrote:
> > We will keep it simple, and I admit that there are a couple minor holes
> > in the lisp-like format that we need to plug.
> >
> > In general however, my thinking is this:
> >
> > Any such file is to be interpreted as a blend of ASCII sequences with
> > intermittent UTF8 sequences. The ASCII sequences are the keywords, '(',
> > and ')' delimiters, everything except a quoted string is ASCII.
> >
> > The UTF8 sequences are reserved ONLY for quoted strings.
>
> Why not everywhere?
>
Yes, why not everywhere?
> Quoted strings are required for ONLY for tokens which must include
> > either a) one of the ASCII white space characters, or b) a non ASCII
> > character, or c) ')' or '('.
>
> Why not just escape white spaces and parentheses (by \x20 or %20)? Also
> UTF-8 multibyte sequences do not interfere with any control characters, so
> no need to enclose them.
>
IMVHO such method greatly complicates parsing by any outside tool. It would
be nice to have file format self-descriptive.
> Within a quoted string, it is assumed to be UTF8, no exceptions, and
> > therefore inherently supports all international 16 bit characters.
>
> Unicode is 21 bit, do not forget this.
>
UTF-8 is able to handle all this as far as I remember, character encoding
can be nested 4 times.
>
> > With this understanding the problem is reduced to quoted strings, and
> >
> > A) differentiating the leading and trailing quote from a quote character
> > within the quoted string, and
>
> Escape quotes to some sequence which do not contain quote. Or just do not
> use quotes.
>
>
>
Quotes are useful in terms of self-descriptive format.
Remember about ignoring UTF markers at the beginning of the file (added by
some windows apps, not added by most linux apps) - otherwise any user
editing the file in notepad will loose his work.
--
Manveru
jabber: manveru@...
gg: 1624001
http://www.manveru.pl
--00032555a33a991add047b56f88a Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br><div class=3D"gmail_quote">2009/12/22 vladimir_uryvaev <span dir=3D=
"ltr"><<a href=3D"mailto:vovanius@...">vovanius@...</a>></span><b=
r><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204=
, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=3D"background-color: rgb(255, 255, 255);">
<span>=C2=A0</span>
<div>
<div>
<div>
=20=20=20=20=20=20
=20=20=20=20=20=20
<div class=3D"im"><br>
<br>
--- In <a href=3D"mailto:kicad-devel%40yahoogroups.com" target=3D"_blank">k=
icad-devel@xxxxxxxxxxxxxxx</a>, Dick Hollenbeck <dick@...> wrote:<br>
> We will keep it simple, and I admit that there are a couple minor hole=
s <br>
> in the lisp-like format that we need to plug.<br>
> <br>
> In general however, my thinking is this:<br>
> <br>
> Any such file is to be interpreted as a blend of ASCII sequences with =
<br>
> intermittent UTF8 sequences. The ASCII sequences are the keywords, =
9;(', <br>
> and ')' delimiters, everything except a quoted string is ASCII=
.<br>
> <br>
> The UTF8 sequences are reserved ONLY for quoted strings.<br>
<br></div>
Why not everywhere?</div></div></div></div></blockquote><div style=3D"backg=
round-color: rgb(255, 255, 255);"><div><div><div><div class=3D"im"><br>Yes,=
why not everywhere?<br><br></div></div></div></div></div><blockquote class=
=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin=
: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=3D"background-color: rgb(255, 255, 255);"><div><div><div><div cl=
ass=3D"im">
> Quoted strings are required for ONLY for tokens which must include <br=
>
> either a) one of the ASCII white space characters, or b) a non ASCII <=
br>
> character, or c) ')' or '('.<br>
<br></div>
Why not just escape white spaces and parentheses (by \x20 or %20)? Also UTF=
-8 multibyte sequences do not interfere with any control characters, so no =
need to enclose them.</div></div></div></div></blockquote><div style=3D"bac=
kground-color: rgb(255, 255, 255);">
<div><div><div><div class=3D"im"><br>IMVHO such method greatly complicates =
parsing by any outside tool. It would be nice to have file format self-desc=
riptive.<br><br></div></div></div></div></div><blockquote class=3D"gmail_qu=
ote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0p=
t 0.8ex; padding-left: 1ex;">
<div style=3D"background-color: rgb(255, 255, 255);"><div><div><div><div cl=
ass=3D"im">
> Within a quoted string, it is assumed to be UTF8, no exceptions, and <=
br>
> therefore inherently supports all international 16 bit characters.<br>
<br></div>
Unicode is 21 bit, do not forget this.</div></div></div></div></blockquote>=
<div style=3D"background-color: rgb(255, 255, 255);"><div><div><div><div cl=
ass=3D"im"><br>UTF-8 is able to handle all this as far as I remember, chara=
cter encoding can be nested 4 times.<br>
</div></div></div></div></div><blockquote class=3D"gmail_quote" style=3D"bo=
rder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding=
-left: 1ex;"><div style=3D"background-color: rgb(255, 255, 255);"><div><div=
><div>
<div class=3D"im">
<br>
> With this understanding the problem is reduced to quoted strings, and<=
br>
> <br>
> A) differentiating the leading and trailing quote from a quote charact=
er <br>
> within the quoted string, and<br>
<br></div>
Escape quotes to some sequence which do not contain quote. Or just do not u=
se quotes.</div></div></div>
<img src=3D"" height=3D"1" width=3D"1"> <br>
<div style=3D"color: rgb(255, 255, 255); min-height: 0pt;"></div>
</div>
=20=20
</blockquote></div><br>Quotes are useful in terms of self-descriptive forma=
t.<br><br>Remember about ignoring UTF markers at the beginning of the file =
(added by some windows apps, not added by most linux apps) - otherwise any =
user editing the file in notepad will loose his work.<br clear=3D"all">
<br>-- <br>Manveru<br>jabber: <a href=3D"mailto:manveru@...">manveru=
@manveru.pl</a><br> =C2=A0 =C2=A0 gg: 1624001<br> =C2=A0 <a href=3D"http://=
www.manveru.pl">http://www.manveru.pl</a><br>
--00032555a33a991add047b56f88a--
Follow ups
References