Loading ...
Sorry, an error occurred while loading the content.

Re: what locale?

Expand Messages
  • Daniel Elstner
    ... Yes -- I said iconv-specific struct members. ... That s what I did in f_strftime(). ... Actually I didn t... but I did indeed forget to vim_free(enc) :-)
    Message 1 of 8 , Mar 21, 2003
    • 0 Attachment
      On Fre, 2003-03-21 at 21:09, Bram Moolenaar wrote:
      > >
      > > Patch attached. I renamed enc_default() to enc_locale(), made it return
      > > an allocated string, and moved the code to set p_enc into src/option.c.
      >
      > That looks good.
      >
      > > Also I generalized convert_setup() a bit so that the caller is no longer
      > > required to explicitely initialize the iconv-specific struct members.
      >
      > That doesn't appear to work properly, because vcp->vc_type is not always
      > initialized.

      Yes -- I said "iconv-specific" struct members.

      > That can be fixed and then setting vcp->vc_fd doesn't
      > need to be set before calling convert_setup().

      That's what I did in f_strftime().

      > You forgot to free the result of convert_setup().

      Actually I didn't... but I did indeed forget to vim_free(enc) :-)

      > I have fixed these issues and I'll send out a patch after a few tests.

      Cool.

      > > I reckon that might cause problems at least on Win32. I don't though
      > > know if strftime() on Windows will ever use UCS-2, UTF-16 or UCS-4.
      >
      > I don't think that strftime() would work with UCS-2, since a string
      > may contain NUL bytes.

      Sure, though actually strftime() returns the length. But I also think
      it's unlikely that strftime() was ever meant to work with UCS-2 or
      UCS-4.

      --Daniel
    Your message has been successfully submitted and would be delivered to recipients shortly.