On Wed, May 4, 2011 at 10:41 AM, Gordon Ross <gordon.w.r...@gmail.com> wrote: > On Wed, May 4, 2011 at 9:27 AM, gerard henry <solar...@gmail.com> wrote: >> do you think that it is the same problem described here: >> http://woss.name/2008/10/16/edge-rails-pre-22-iconv-transliteration-and-solaris/ > > Yes. Any code expecting to call iconv_open(3C) with a code set name > containing "//translit" and/or "//ignore" is depending non-standard features > of GNU iconv. The iconv(3C) function provides ways for the caller to do > equivalent things (see the iconv error returns). The calling code would be > more portable if modified to do its own handling of characters that can not > be converted (at least when linked with something other than GNU iconv). >
Gordon is absolutely right. The PHP iconv functions unfortunately do not report the iconv() return value directly but you *can* make them generate an exception on conversion failure. I fixed this problem in the Roundcube webmail system and you can see the discussion here: http://trac.roundcube.net/ticket/1486375 You can use the final implementation in the commit at the end of the ticket as a "good" [1] example for how to use iconv in PHP... [1] PHP sucks. -Albert _______________________________________________ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss