Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

freebsd

Name: Anonymous 2009-02-10 21:38

$ LC_ALL=el_GR.UTF-8 /usr/bin/cal
                                                                                (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿
(꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿                        (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿                    (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿                (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿            (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿        (꿿$꿿8꿿H꿿M▒鿿꿿                                                    (꿿$꿿8꿿H꿿M▒鿿꿿
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28


zsh: segmentation fault  LC_ALL=el_GR.UTF-8 /usr/bin/cal

Name: Anonymous 2009-02-10 22:22

>>8
http://www.opensource.apple.com/darwinsource/10.5.5/misc_cmds-23/calendar/day.c
static struct fixs fndays[8];         /* full national days names */
static struct fixs ndays[8];          /* short national days names */

static struct fixs fnmonths[13];      /* full national months names */
static struct fixs nmonths[13];       /* short national month names */


void setnnames(void)
{
    char buf[80];
    int i, l;
    struct tm tm;

    for (i = 0; i < 7; i++) {
        tm.tm_wday = i;
        strftime(buf, sizeof(buf), "%a", &tm);
        for (l = strlen(buf);
             l > 0 && isspace((unsigned char)buf[l - 1]);
             l--)
            ;
        buf[l] = '\0';
        if (ndays[i].name != NULL)
            free(ndays[i].name);
        if ((ndays[i].name = strdup(buf)) == NULL)
            errx(1, "cannot allocate memory");
        ndays[i].len = strlen(buf);

        strftime(buf, sizeof(buf), "%A", &tm);
        for (l = strlen(buf);
             l > 0 && isspace((unsigned char)buf[l - 1]);
             l--)
            ;
        buf[l] = '\0';
        if (fndays[i].name != NULL)
            free(fndays[i].name);
        if ((fndays[i].name = strdup(buf)) == NULL)
            errx(1, "cannot allocate memory");
        fndays[i].len = strlen(buf);
    }

    for (i = 0; i < 12; i++) {
        tm.tm_mon = i;
        strftime(buf, sizeof(buf), "%b", &tm);
        for (l = strlen(buf);
             l > 0 && isspace((unsigned char)buf[l - 1]);
             l--)
            ;
        buf[l] = '\0';
        if (nmonths[i].name != NULL)
            free(nmonths[i].name);
        if ((nmonths[i].name = strdup(buf)) == NULL)
            errx(1, "cannot allocate memory");
        nmonths[i].len = strlen(buf);

        strftime(buf, sizeof(buf), "%B", &tm);
        for (l = strlen(buf);
             l > 0 && isspace((unsigned char)buf[l - 1]);
             l--)
            ;
        buf[l] = '\0';
        if (fnmonths[i].name != NULL)
            free(fnmonths[i].name);
        if ((fnmonths[i].name = strdup(buf)) == NULL)
            errx(1, "cannot allocate memory");
        fnmonths[i].len = strlen(buf);
    }
}


>>6
mn_MN.UTF-8 has the same problem.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List