[Ecls-list] Sequence streams
mm_lists at pulsar-zone.net
Sun Aug 28 09:53:29 UTC 2011
On Sun, 28 Aug 2011 11:40:29 +0200
Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> wrote:
> What is the use of writing bytes to a string? In many cases you may end up
> with corrupt sequences, since the bytes produced by a external format do not
> need to correspond to valid strings in the latin-1 and ucs4 formats which
> are used internally by ECL.
What I would have expected is for bytes to be decoded to characters as
per the specified external-format, just like when reading from a file
or network stream. This way, the ECL unicode encoders and decoders are
no longer a black box and no external resources are needed when custom
encoders/decoders are used in user code...
For instance in this case, URLs are encoded as UTF-8 octets with % HEX
HEX for every needed and non-ASCII byte. I then could perform the
needed decoding to bytes in a custom function and read the bytes as
Of course, if that worked, any decoding error would be expected to also
signal an error just like when reading bytes from a file or socket.
Tomorrow I might have time to test the latest fixes you commited.
More information about the ecl-devel