Hello.

While debugging one strange issue (gftp doesn't show file names on OI), I've found the following difference in locale behavior between OI Hipster and Solaris (snv 97).

The following program:

#include <stdio.h>
#include <time.h>
#include <libintl.h>
#include <locale.h>

int main()
{
  struct tm curtime;
  char *str="Feb  6 16:38 .",*tmppos,*format;

 setlocale(LC_ALL,"en_US.UTF-8");

 // format = dcgettext ("SUNW_OST_OSCMD", " %b %e  %Y ", LC_TIME);
  format= dcgettext ("SUNW_OST_OSCMD", " %b %e %H:%M ", LC_TIME);
  if (format && *format == ' ')
          format++;
  tmppos = strptime (str, format, &curtime);
// tmppos = strptime (str, "%b %e %H:%M", &curtime);

  printf("tmppos=%s",tmppos);
  return 0;
}

On OI prints:
tmppos=.

On Solaris:
tmppos= .

Note the space.

Who is correct? Is it worth filing a bug?

--
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department


-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to