public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug locale/19418] iconv should stop reading from 'inbuf' when 'outbytesleft' is zero
       [not found] <bug-19418-131@http.sourceware.org/bugzilla/>
@ 2023-02-18 23:09 ` bruno at clisp dot org
  0 siblings, 0 replies; only message in thread
From: bruno at clisp dot org @ 2023-02-18 23:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19418

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno at clisp dot org

--- Comment #3 from Bruno Haible <bruno at clisp dot org> ---
(In reply to Andreas Schwab from comment #2)
> It is impossible in general to know how much space is needed in *outbuf
> before reading the next bytes from *inbuf.

Right. In particular some bytes from the input may be dropped from the output.
See:

$ printf 'x\U000E0004' | iconv -f UTF-8 -t UCS-2BE | od -t x1
0000000 00 78
0000002

It produces the same output as

$ printf 'x' | iconv -f UTF-8 -t UCS-2BE | od -t x1
0000000 00 78
0000002

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-18 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19418-131@http.sourceware.org/bugzilla/>
2023-02-18 23:09 ` [Bug locale/19418] iconv should stop reading from 'inbuf' when 'outbytesleft' is zero bruno at clisp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).