This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/21656] New: Missing last character when target-charset set to CP1255
- From: "bgkweb at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 22 Jun 2017 04:49:28 +0000
- Subject: [Bug gdb/21656] New: Missing last character when target-charset set to CP1255
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21656
Bug ID: 21656
Summary: Missing last character when target-charset set to
CP1255
Product: gdb
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: bgkweb at gmail dot com
Target Milestone: ---
When the target charset is set to CP1255, strings are most of the time missing
their last character.
Reproduction steps:
$ gdb
GNU gdb (GDB) 8.0
This GDB was configured as "x86_64-pc-linux-gnu".
(gdb) show host-charset
The host character set is "auto; currently UTF-8".
(gdb) set target-charset CP1255
(gdb) print "שתכננו"
$1 = "שתכננ"
(gdb)
Notice how the last "ו" from the input string is missing. (Hebrew is a right to
left language, the last character is on the left in a browser)
This is most likely due to the fact that CP1255 is a stateful encoding in iconv
and the iconv conversion state is not flushed.
man 3 iconv explains iconv must be called a second time with inbuf = NULL to
flush the conversion state to the output buffer. See also #1124.
--
You are receiving this mail because:
You are on the CC list for the bug.