strftime %b is broken on ja_JP locale

IWAMURO Motonori deenheart@gmail.com
Wed May 12 15:31:00 GMT 2010


Hi.

strftime %b is broken on ja_JP locale on cygwin-1.7.5-1.

[monthtest.c]
--------
#include <stdio.h>
#include <time.h>
#include <locale.h>
int main(void) {
  time_t now;
  struct tm *tm;
  char buffer[4096];
  setlocale(LC_ALL, "ja_JP.UTF-8");
  time(&now);
  tm = localtime(&now);
  strftime(buffer, sizeof(buffer), "[%B][%b]\n", tm);
  puts(buffer);
  return 0;
}
--------

- result on Cygwin: [5月][5] - missing suffix "月" (U+6708).
- result on Debian lenny: [5月][ 5月]
-- 
IWAMURO Motnori <http://vmi.jp/>



More information about the Newlib mailing list