Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150547276
D34342.id103109.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
842 B
Referenced Files
None
Subscribers
None
D34342.id103109.diff
View Options
Index: usr.bin/iconv/iconv.c
===================================================================
--- usr.bin/iconv/iconv.c
+++ usr.bin/iconv/iconv.c
@@ -77,9 +77,16 @@
unsigned long long invalids;
size_t inbytes, outbytes, ret;
- int arg = (int)hide_invalid;
- if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&arg) == -1)
- err(EXIT_FAILURE, "iconvctl(DISCARD_ILSEQ, %d)", arg);
+ /*
+ * Don't touch ICONV_SET_DISCARD_ILSEQ if -c wasn't specified. It may
+ * be that the user has specified //IGNORE in the -t specification, and
+ * we don't want to clobber that.
+ */
+ if (hide_invalid) {
+ int arg = (int)hide_invalid;
+ if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&arg) == -1)
+ err(EXIT_FAILURE, "iconvctl(DISCARD_ILSEQ, %d)", arg);
+ }
invalids = 0;
while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 6:13 AM (6 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30746756
Default Alt Text
D34342.id103109.diff (842 B)
Attached To
Mode
D34342: iconv: only conditionally use ICONV_SET_DISCARD_ILSEQ
Attached
Detach File
Event Timeline
Log In to Comment