libiconv - iconv_open() default behavior?
According to the documentation of iconv_open() over: http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
"//TRANSLIT" means that when a character cannot be represented in the target character set, it can be approximated through one or several characters.
and:
"//IGNORE" means that characters that cannot be represented in the target character set will be silently discarded.
But what is the de开发者_运维问答fault behavior, when neither are specified?
Thanks, Doori Bar
The default behaviour is to stop conversion and return -1, with errno
set to EILSEQ
if an character that cannot be converted to the target character set is encountered.
(ie. This is different to both //TRANSLIT
and //IGNORE
).
精彩评论