Bruno Haible wrote in
<4298913.vrqWZg68TM@omega>:
|Steffen Nurpmeso wrote:
|> ...
|>| [.] "UTF-7"."
|>
|> That is overshoot.
|
|No. UTF-7 is invalid here because it produces output that is not NUL
|terminated. See:
|
|$ printf 'ab\0' | iconv -t UTF-7 | od -t c
|0000000 a b + A A A -
|0000007
|
|strlen() on such a return value makes invalid memory accesses.
|You can convince yourself by running
|$ OUTPUT_CHARSET=UTF-7 valgrind ls --help
This is then surely bogus? UTF-7 is a normal single byte
character set and is to be terminated like anything else. Nothing
in RFC 2152 nor RFC 3501 if you want makes me think something
else.