Greg Wooledge <wool...@eeg.ccf.org> writes: > On Thu, Feb 06, 2014 at 11:51:25AM +0800, Dan Jacobson wrote: >> # su - nobody >> No directory, logging in with HOME=/ >> $ cat /tmp/r >> LC_CTYPE=zh_TW.UTF-8 N=$(echo ??????|iconv -t big5 -f utf-8) sh -xc ': $N' >> $ sh /tmp/r >> /tmp/r: line 1: 4551 Segmentation fault LC_CTYPE=zh_TW.UTF-8 N=$(echo >> ??????|iconv -t big5 -f utf-8) sh -xc ': $N' >> >> Something about that embedded null. >> bash, version 4.3.0(1)-rc1 (i486-pc-linux-gnu) > > Just for the record, a variable can't contain a NUL byte. I don't > know what your input string is (my system can't handle this locale; I > just see ?????? in my mail client), nor do I know what the output of > the iconv command is for that input. Let's speculate that (as implied > by your Subject) there is a NUL byte somewhere in the middle of it.
BIG5 is a multi-byte encoding, it doesn't have embedded NUL bytes. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."