Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 165368 - iconv doesn't completely clean up converter state when converting from UTF-16
iconv doesn't completely clean up converter state when converting from UTF-16
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-08-08 12:44 EDT by Matthias Clasen
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-08 13:51:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a testcase (1.54 KB, text/x-csrc)
2005-08-08 12:44 EDT, Matthias Clasen
no flags Details

  None (edit)
Description Matthias Clasen 2005-08-08 12:44:28 EDT
It does not forget a seen BOM, therefore, you cannot reuse a UTF-16 -> UTF-8
converter for converting chunks of UTF-16 of different endianness, even if they
both start with a BOM.

The attached testcase demonstrates this.
Comment 1 Matthias Clasen 2005-08-08 12:44:28 EDT
Created attachment 117544 [details]
a testcase
Comment 2 Ulrich Drepper 2005-08-08 13:51:51 EDT
This is not a bug.  Flushing using iconv() only resets the shift state.  This is
needed for stateful encodings with states where the caller wants a converted
string to end in the initial state.  The BOM recognition has nothing to do with
shift states.  Once the byte order is determined this is a property which stays
with the iconv_t descriptor for its lifetime.

Note You need to log in before you can comment on or make changes to this bug.