the conversion api allows to pass an offsets array parallel to the target
array.
each element k number i in k=offsets[i] will get an index that indicates that
the output element target[i] comes from the source character that begins at
source[k].
this is discontiguous: when an input character spans two conversion
calls/buffers, the offset index is -1. an application can try to avoid this by
passing complete input characters in each call/buffer, but that may not be the
best thing to do.
i propose to add a mode (set/get functions with boolean value like usesFallback)
and implementation to allow continuous offset indexing. indexing would not be
zero-based with the buffer but with the entire stream. it would start at 0 with
a new converter, after a reset() and after a flush=TRUE. otherwise, the offset
indexes should count continuously as if all source buffers were one stream. this
can then be contiguous because the start of a source character in a previous
buffer is still a valid index. such an index would need to be stored in
UConverter. the mode (on/off) needs to be stored there, too.
the mode switch is necessary because a change for all such conversions without
explicit selection would break existing applications.