Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168165317
D34342.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
809 B
Referenced Files
None
Subscribers
None
D34342.diff
View Options
diff --git a/usr.bin/iconv/iconv.c b/usr.bin/iconv/iconv.c
--- a/usr.bin/iconv/iconv.c
+++ b/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
Thu, Aug 27, 4:31 PM (18 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37401615
Default Alt Text
D34342.diff (809 B)
Attached To
Mode
D34342: iconv: only conditionally use ICONV_SET_DISCARD_ILSEQ
Attached
Detach File
Event Timeline
Log In to Comment