[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case mappings

This page is part of the web mail archives of SRFI 75 from before July 7th, 2015. The new archives for SRFI 75 contain all messages, not just those from before July 7th, 2015.

Michael Sperber <sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

> For my applications, the case mappings defined in the draft are plenty
> useful---they're sure useful well beyond ASCII.  Restricting them to
> ASCII would make them very significantly less useful to me.  (What
> with me being a German an all.  And BTW, no, the eszet issue is not
> usually a problem in practice---it sure doesn't keep the case mappings
> from being useful.)

Your applications are useful *for German* maybe.... but that doesn't
mean that the code you write, thinking only of your case, will work
where the locale is different and more serious problems arise.

You are quite right that this is a hard problem.  However:

Scheme has a system for numeric procedures that works automagically
for systems that want really fancy stuff.  We should have the same for
characters.  A half-baked solution is worse than none.  We don't have
to have *any* case-mapping procedures, but it would be shameful to
have bad ones when we knew better.

ASCII-only ones are bad, and UnicodeData.txt-only ones are also bad.
We can do the Right Thing, darn it all, and stop punting saying "oooh,
it's too hard", when it's really not that hard at all.

The fundamental thing to learn and get over is:

Case mapping is not a character-to-character function, it is a
string-to-string function.

Once you learn that, everything else becomes trivial.