[I18n-sig] Extending definition of errors argument to codecs

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 15 May 2001 23:09:52 +0200


> This has been proposed some months ago already. The problem with
> this approach is that it seriously breaks binary compatibility
> at the C level, since all C APIs use const char *error.

As discussed last time, this is not a serious problem. You could move
the existing API to use callable objects as arguments, and provide
wrapper functions that still accept strings.

> simply returning a usable replacement character isn't enough in the
> general case

That points to the major problem we had list time: We could not agree
on what the general case is.

In every demonstrated use case, a simple replacement string would have
been enough (remember that, in the XML case, it would have also been a
replacement *string*, e.g. "Ⴓ")

> Still, it's lots of work and I'm not sure whether it wouldn't
> be more worthwhile adding these sort of special error handling
> schemes to the codecs in question rather than making them
> a generic option for all codecs.

Ok, this is an improvement over the last time this discussion came up,
where we only agreed to implement an "XML" error handling or some such.

Regards,
Martin