Christian M. Cepel writes:
| I would prefer that it have optional modes... Strict, not-so-strict,
| loose/forgiving, recover ABC from any textfile, etc... something.
The really fun case is recovering ABC from HTML files. ;-)
My Tune Finder tries to do this, with varying degrees of success. The
problem can perhaps be illustrated by the following fragment, which
some people think should be a good way to do it:
<pre>
...
| a<b a>g |
...
</pre>
The contents of a <pre>...</pre> section are, of course, also HTML,
and HTML tags are honored. So this measure of music contains a <B>
tag with an "a" attribute which is ignored (because it's not
defined). In a browser windows, the b and a notes don't appear in the
output, giving the measuure | ag |, and the rest of the tune is
rendered in a bold font. This is the most common sort of HTML tag to
appear in ABC tunes, but others also occur, sometimes with very
strange effect.
Of course, you will occasionally see the above measure encoded as HTML
entities:
| a<b a>g |
This is correct HTML, but causes the opposite problem that ABC
software that's not HTML-aware will not undo the encoding, and will
attempt to interpret it all as ABC. Depending on whether or not the
'&' ABC operator is implemented, this will produce various kinds of
incorrect output. In the best case, it will produce a few warnings
and the measure | ab ag |, which at least has the right notes.
Then there are the sites that send *.abc files as text/html, although
they are actually text/plain. There are a number of these, and the
people who have the misfortune to put their abc files on line on such
sites usually get quite frustrated trying to get the site's admins to
correct the bad type. (And setting the type to text/vnd.abc is often
far beyond the admins' capabilities. ;-)
Since ABC is widely used to send tunes via email, ABC ends up being
embedded inside messages in lots of other formats. It's fairly common
for this to garble the ABC, as the encoding software is usually
debugged only with ordinary (English) text. Decoding is fairly
haphazard, and it will be common for your software to encounter
partly-decoded email messages that contain partly-decoded tunes.
The sensible thing might be to just throw up your hands and refuse to
deal with it. But you have a lot of companies working on a lot of
email software doing their best to make life difficult for you.
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html