In message <[EMAIL PROTECTED]>
          "Chris Young" <[EMAIL PROTECTED]> wrote:

> On 22 Aug 2008 23:31:43 +0100, Chris Young wrote:
> 
> > I have another problem with forms, which occurs when a form has no
> > input.
> > 
> > I've tracked it down to line 335 of utils/utf8.c.  When in=="" and/or
> > slen==0, the iconv function returns -1.
> 
> My solution is to add the following to the start of utf8_to_enc in
> utils/utf8.c:
> 
>       if(!strlen(string))
>       {
>               *result = strdup("");
>               return UTF8_CONVERT_OK;
>       }
> 
> Shall I go ahead and commit this, or is there a better way? (or should
> I #ifdef it?)

I don't mind this workaround but 1) please add a comment why this gets
added and 2) "if (string[0] == '\0')" or "if (!string[0])" please.

John.
-- 
John Tytgat
[EMAIL PROTECTED]

Reply via email to