Am Mi., 5. Jan. 2022 um 21:59 Uhr schrieb Bruno Haible :
>
> Hello Marc,
>
[...]
> > If I understand your classification correctly, I meant something more
> > like (E) than (D), I think. As an interface, I would propose would be
> > something along the following lines:
> >
> > decoder_t d =
Hello Marc,
> > (A) Using a pipe at the shell level:
> > iconv -t UTF-8 | my-program
> >
> > (B) Using a programming language that has a coroutines concept.
> > This way, both the decoder and the consumer can be programmed in
> > a straightforward manner.
> >
> > (C) In C, with
Hi Bruno,
thanks for your insights, valuable as always.
Am Sa., 1. Jan. 2022 um 13:57 Uhr schrieb Bruno Haible :
>
> Hi Marc,
>
> > The demand to read a file (in local encoding) and to decode it
> > incrementally seems a typical one.
>
> There are four ways to satisfy this demand.
>
> (A) Using
Hi Marc,
> The demand to read a file (in local encoding) and to decode it
> incrementally seems a typical one.
There are four ways to satisfy this demand.
(A) Using a pipe at the shell level:
iconv -t UTF-8 | my-program
(B) Using a programming language that has a coroutines concept.
The demand to read a file (in local encoding) and to decode it
incrementally seems a typical one.
With Gnulib, this can be done using the mbfile module to read in the
multibytes byte-by-byte and then using the striconveh module to decode
the multibytes in, say, UTF-8 or UTF-32.
This, however,