[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnu-libiconv] [bug #57723] Conversion from CP1258 to UTF-8 may drop
From: |
anonymous |
Subject: |
[bug-gnu-libiconv] [bug #57723] Conversion from CP1258 to UTF-8 may drop last byte |
Date: |
Sun, 2 Feb 2020 04:18:30 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?57723>
Summary: Conversion from CP1258 to UTF-8 may drop last byte
Project: libiconv
Submitted by: None
Submitted on: Sun 02 Feb 2020 09:18:28 AM UTC
Category: Converters
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When converting CP1258 encoded texts to UTF-8, the last character may be
dropped, without any error indication. This appears to happen regardless of
the length of the input text. Conversion from CP1252 works as expected.
The attached program iconv-bug.c shows that; the last assertion fails.
Apparently, the last character is considered to be a combining character, so
cp1258_mbtowc() returns RET_TOOFEW(1), but unicode_loop_convert() then returns
without calling cp1258_mbtowc() again.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 02 Feb 2020 09:18:28 AM UTC Name: iconv-bug.c Size: 551B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=48331>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57723>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug-gnu-libiconv] [bug #57723] Conversion from CP1258 to UTF-8 may drop last byte,
anonymous <=