[EMAIL PROTECTED] asks:
>
> i was wondering about libiconv: is there any plan to support
> a fall-back character when performing conversions, as opposed to
> always stopping conversion when a character with no destination
> representation is encountered?
In general, providing fallback characters is the business of the
caller of iconv(). The iconv() function's role is only to determine
whether the input character is convertible to the output codeset, and
if so, how.
It would make sense to add a command line option to the iconv
_program_ to force a question mark for unconvertible characters. It
already has an option ('-c', most useful together with '-s') to omit
unconvertible characters from the output.
As a special case, glibc's iconv() function uses '?' as a fallback
character if conversion is performed with transliteration (i.e. the
target encoding has a //TRANSLIT suffix).
> Hrm, I was under the impression that converting from
> non-unicode to unicode was always possible.
Yes it is, except for a few bordercases like Inuktitut characters or
some rare chinese ideographs, which therefore are mapped to Unicode
private areas until they have been officially added to Unicode.
> Unfortunately, while experimenting with my system iconv, it appears
> to instead stop when there is no destination encoding for a character,
> rather than allowing a fallback to a default character.
Try "iconv -c -s".
Bruno
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/